Compare commits

..

2 Commits

Author SHA1 Message Date
329d023438 2.0.0-RC1 2024-04-20 12:08:18 +03:00
cb1c6d79a7 2.0.0-RC1 2024-04-20 09:19:11 +03:00
8 changed files with 68 additions and 69 deletions

View File

@ -25,18 +25,18 @@ kotlin.explicitApiWarning()
dependencies { dependencies {
api(libs.kotlin.gradle) api(libs.kotlin.gradle)
api("org.gradle.toolchains:foojay-resolver:0.7.0") api("org.gradle.toolchains:foojay-resolver:0.8.0")
implementation(libs.binary.compatibility.validator) implementation(libs.binary.compatibility.validator)
implementation(libs.changelog.gradle) implementation(libs.changelog.gradle)
implementation(libs.dokka.gradle) implementation(libs.dokka.gradle)
implementation(libs.kotlin.jupyter.gradle) implementation(libs.kotlin.jupyter.gradle)
implementation(libs.kotlin.serialization) implementation(libs.kotlin.serialization)
implementation(libs.kotlinx.html) implementation(libs.kotlinx.html)
implementation("org.tomlj:tomlj:1.1.0") implementation("org.tomlj:tomlj:1.1.1")
// // nexus publishing plugin // // nexus publishing plugin
// implementation("io.github.gradle-nexus:publish-plugin:1.1.0") // implementation("io.github.gradle-nexus:publish-plugin:1.1.0")
implementation("org.freemarker:freemarker:2.3.31") implementation("org.freemarker:freemarker:2.3.32")
testImplementation(kotlin("test")) testImplementation(kotlin("test"))
} }

View File

@ -1,16 +1,54 @@
## Generated by $ ./gradlew refreshVersionsCatalog
[plugins]
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
compose = { id = "org.jetbrains.compose", version.ref = "compose" }
ktor = {id = "io.ktor.plugin", version.ref = "ktor"}
gradle-common = { id = "space.kscience.gradle.common", version.ref = "tools" }
gradle-project = { id = "space.kscience.gradle.project", version.ref = "tools" }
gradle-mpp = { id = "space.kscience.gradle.mpp", version.ref = "tools" }
gradle-jvm = { id = "space.kscience.gradle.jvm", version.ref = "tools" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-android-extensions = { id = "org.jetbrains.kotlin.android.extensions", version.ref = "kotlin" }
kotlin-js = { id = "org.jetbrains.kotlin.js", version.ref = "kotlin" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlin-native-cocoapods = { id = "org.jetbrains.kotlin.native.cocoapods", version.ref = "kotlin" }
kotlin-plugin-allopen = { id = "org.jetbrains.kotlin.plugin.allopen", version.ref = "kotlin" }
kotlin-plugin-jpa = { id = "org.jetbrains.kotlin.plugin.jpa", version.ref = "kotlin" }
kotlin-plugin-lombok = { id = "org.jetbrains.kotlin.plugin.lombok", version.ref = "kotlin" }
kotlin-plugin-noarg = { id = "org.jetbrains.kotlin.plugin.noarg", version.ref = "kotlin" }
kotlin-plugin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
kotlin-plugin-scripting = { id = "org.jetbrains.kotlin.plugin.scripting", version.ref = "kotlin" }
kotlin-plugin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
kotlin-plugin-spring = { id = "org.jetbrains.kotlin.plugin.spring", version.ref = "kotlin" }
kotlin-jupyter-api = { id = "org.jetbrains.kotlin.jupyter.api", version.ref = "kotlin-jupyter" }
kotlinx-benchmark = { id = "org.jetbrains.kotlinx.benchmark", version.ref = "kotlinx-benchmark" }
[versions] [versions]
tools = "0.15.2-kotlin-2.0.0-Beta4"
kotlin = "2.0.0-Beta4" tools = "0.15.2-kotlin-2.0.0-RC1"
kotlin = "2.0.0-RC1"
# https://github.com/Kotlin/kotlinx-atomicfu # https://github.com/Kotlin/kotlinx-atomicfu
atomicfu = "0.23.1" atomicfu = "0.23.1"
# https://github.com/Kotlin/binary-compatibility-validator # https://github.com/Kotlin/binary-compatibility-validator
binary-compatibility-validator = "0.13.2" binary-compatibility-validator = "0.14.0"
# https://github.com/JetBrains/gradle-changelog-plugin # https://github.com/JetBrains/gradle-changelog-plugin
changelog = "2.2.0" changelog = "2.2.0"
# https://github.com/Kotlin/dokka # https://github.com/Kotlin/dokka
dokka = "1.9.10" dokka = "1.9.20"
# https://github.com/Kotlin/kotlin-jupyter # https://github.com/Kotlin/kotlin-jupyter
kotlin-jupyter = "0.12.0-93" kotlin-jupyter = "0.12.0-192"
# https://github.com/Kotlin/kotlinx-benchmark # https://github.com/Kotlin/kotlinx-benchmark
kotlinx-benchmark = "0.4.9" kotlinx-benchmark = "0.4.9"
# https://github.com/Kotlin/kotlinx-cli # https://github.com/Kotlin/kotlinx-cli
@ -20,7 +58,7 @@ kotlinx-coroutines = "1.8.0"
# https://github.com/Kotlin/kotlinx-datetime # https://github.com/Kotlin/kotlinx-datetime
kotlinx-datetime = "0.4.1" kotlinx-datetime = "0.4.1"
# https://github.com/Kotlin/kotlinx.html # https://github.com/Kotlin/kotlinx.html
kotlinx-html = "0.9.1" kotlinx-html = "0.11.0"
# https://github.com/Kotlin/kotlinx-knit # https://github.com/Kotlin/kotlinx-knit
kotlinx-knit = "0.4.0" kotlinx-knit = "0.4.0"
# https://github.com/Kotlin/kotlinx-nodejs # https://github.com/Kotlin/kotlinx-nodejs
@ -34,16 +72,17 @@ xmlutil = "0.86.2"
# https://github.com/Him188/yamlkt # https://github.com/Him188/yamlkt
yamlkt = "0.13.0" yamlkt = "0.13.0"
# https://github.com/JetBrains/kotlin-wrappers # https://github.com/JetBrains/kotlin-wrappers
jsBom = "1.0.0-pre.648" jsBom = "1.0.0-pre.732"
junit = "5.9.3" junit = "5.9.3"
# https://github.com/JetBrains/compose-multiplatform # https://github.com/JetBrains/compose-multiplatform
compose = "1.5.11" compose = "1.6.2"
# https://mvnrepository.com/artifact/org.slf4j/slf4j-api # https://mvnrepository.com/artifact/org.slf4j/slf4j-api
slf4j = "2.0.9" slf4j = "2.0.9"
# https://mvnrepository.com/artifact/ch.qos.logback/logback-classic # https://mvnrepository.com/artifact/ch.qos.logback/logback-classic
logback = "1.4.11" logback = "1.4.11"
[libraries] [libraries]
atomicfu-gradle = { module = "org.jetbrains.kotlinx:atomicfu-gradle-plugin", version.ref = "atomicfu" } atomicfu-gradle = { module = "org.jetbrains.kotlinx:atomicfu-gradle-plugin", version.ref = "atomicfu" }
atomicfu = { module = "org.jetbrains.kotlinx:atomicfu", version.ref = "atomicfu" } atomicfu = { module = "org.jetbrains.kotlinx:atomicfu", version.ref = "atomicfu" }
@ -105,40 +144,3 @@ yamlkt = { module = "net.mamoe.yamlkt:yamlkt", version.ref = "yamlkt" }
slf4j = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" } slf4j = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
logback-classic = { module = "ch.qos.logback:logback-classic", version.ref = "logback" } logback-classic = { module = "ch.qos.logback:logback-classic", version.ref = "logback" }
[plugins]
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
compose = { id = "org.jetbrains.compose", version.ref = "compose" }
ktor = {id = "io.ktor.plugin", version.ref = "ktor"}
gradle-common = { id = "space.kscience.gradle.common", version.ref = "tools" }
gradle-project = { id = "space.kscience.gradle.project", version.ref = "tools" }
gradle-mpp = { id = "space.kscience.gradle.mpp", version.ref = "tools" }
gradle-jvm = { id = "space.kscience.gradle.jvm", version.ref = "tools" }
gradle-js = { id = "space.kscience.gradle.js", version.ref = "tools" }
gradle-native = { id = "space.kscience.gradle.native", version.ref = "tools" }
gradle-node = { id = "space.kscience.gradle.node", version.ref = "tools" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-android-extensions = { id = "org.jetbrains.kotlin.android.extensions", version.ref = "kotlin" }
kotlin-js = { id = "org.jetbrains.kotlin.js", version.ref = "kotlin" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlin-native-cocoapods = { id = "org.jetbrains.kotlin.native.cocoapods", version.ref = "kotlin" }
kotlin-plugin-allopen = { id = "org.jetbrains.kotlin.plugin.allopen", version.ref = "kotlin" }
kotlin-plugin-jpa = { id = "org.jetbrains.kotlin.plugin.jpa", version.ref = "kotlin" }
kotlin-plugin-lombok = { id = "org.jetbrains.kotlin.plugin.lombok", version.ref = "kotlin" }
kotlin-plugin-noarg = { id = "org.jetbrains.kotlin.plugin.noarg", version.ref = "kotlin" }
kotlin-plugin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
kotlin-plugin-scripting = { id = "org.jetbrains.kotlin.plugin.scripting", version.ref = "kotlin" }
kotlin-plugin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
kotlin-plugin-spring = { id = "org.jetbrains.kotlin.plugin.spring", version.ref = "kotlin" }
kotlin-jupyter-api = { id = "org.jetbrains.kotlin.jupyter.api", version.ref = "kotlin-jupyter" }
kotlinx-benchmark = { id = "org.jetbrains.kotlinx.benchmark", version.ref = "kotlinx-benchmark" }

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View File

@ -1,5 +1,6 @@
rootProject.name = "gradle-tools" rootProject.name = "gradle-tools"
plugins { plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version("0.7.0") id("org.gradle.toolchains.foojay-resolver-convention") version("0.8.0")
id("de.fayard.refreshVersions") version "0.60.5"
} }

View File

@ -9,6 +9,7 @@ import org.gradle.api.tasks.testing.Test
import org.gradle.jvm.toolchain.JavaLanguageVersion import org.gradle.jvm.toolchain.JavaLanguageVersion
import org.gradle.kotlin.dsl.* import org.gradle.kotlin.dsl.*
import org.gradle.language.jvm.tasks.ProcessResources import org.gradle.language.jvm.tasks.ProcessResources
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinJsProjectExtension import org.jetbrains.kotlin.gradle.dsl.KotlinJsProjectExtension
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
@ -230,8 +231,8 @@ public open class KScienceExtension(public val project: Project) {
*/ */
public fun useContextReceivers() { public fun useContextReceivers() {
project.tasks.withType<KotlinCompile> { project.tasks.withType<KotlinCompile> {
kotlinOptions { compilerOptions{
freeCompilerArgs = freeCompilerArgs + "-Xcontext-receivers" freeCompilerArgs.add("-Xcontext-receivers")
} }
} }
} }
@ -359,11 +360,10 @@ public open class KScienceMppExtension(project: Project) : KScienceExtension(pro
project.pluginManager.withPlugin("org.jetbrains.kotlin.multiplatform") { project.pluginManager.withPlugin("org.jetbrains.kotlin.multiplatform") {
project.configure<KotlinMultiplatformExtension> { project.configure<KotlinMultiplatformExtension> {
jvm { jvm {
compilations.all { @OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions.configure { compilerOptions{
freeCompilerArgs.addAll(defaultKotlinJvmArgs) freeCompilerArgs.addAll(defaultKotlinJvmArgs)
} }
}
block() block()
} }
sourceSets { sourceSets {
@ -458,8 +458,8 @@ public open class KScienceMppExtension(project: Project) : KScienceExtension(pro
) { ) {
js { js {
browser { browser {
webpackTask { commonWebpackConfig{
mainOutputFileName.set(bundleName) outputFileName = bundleName
} }
browserConfig() browserConfig()
} }

View File

@ -6,11 +6,13 @@ import org.gradle.kotlin.dsl.apply
import org.gradle.kotlin.dsl.configure import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.invoke import org.gradle.kotlin.dsl.invoke
import org.jetbrains.dokka.gradle.DokkaPlugin import org.jetbrains.dokka.gradle.DokkaPlugin
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
import space.kscience.gradle.internal.applySettings import space.kscience.gradle.internal.applySettings
import space.kscience.gradle.internal.defaultKotlinCommonArgs import space.kscience.gradle.internal.defaultKotlinCommonArgs
public open class KScienceMPPlugin : Plugin<Project> { public open class KScienceMPPlugin : Plugin<Project> {
override fun apply(project: Project): Unit = project.run { override fun apply(project: Project): Unit = project.run {
if (!plugins.hasPlugin("org.jetbrains.kotlin.multiplatform")) { if (!plugins.hasPlugin("org.jetbrains.kotlin.multiplatform")) {
//apply<KotlinMultiplatformPlugin>() for some reason it does not work //apply<KotlinMultiplatformPlugin>() for some reason it does not work
@ -38,13 +40,9 @@ public open class KScienceMPPlugin : Plugin<Project> {
languageSettings.applySettings() languageSettings.applySettings()
} }
} }
@OptIn(ExperimentalKotlinGradlePluginApi::class)
targets.all { compilerOptions{
compilations.all { freeCompilerArgs.addAll(defaultKotlinCommonArgs)
kotlinOptions{
freeCompilerArgs += defaultKotlinCommonArgs
}
}
} }
if (explicitApi == null) explicitApiWarning() if (explicitApi == null) explicitApiWarning()

View File

@ -91,7 +91,7 @@ public open class KScienceProjectPlugin : Plugin<Project> {
repositories { repositories {
mavenCentral() mavenCentral()
maven("https://repo.kotlin.link") maven("https://repo.kotlin.link")
maven("https://maven.pkg.jetbrains.space/spc/p/sci/dev") google()
} }
// Workaround for https://github.com/gradle/gradle/issues/15568 // Workaround for https://github.com/gradle/gradle/issues/15568

View File

@ -8,9 +8,7 @@ import space.kscience.gradle.KScienceVersions
internal val defaultKotlinJvmArgs: List<String> = listOf( internal val defaultKotlinJvmArgs: List<String> = listOf(
"-Xjvm-default=all", "-Xjvm-default=all"
"-Xlambdas=indy",
/* "-Xjdk-release=${KScienceVersions.JVM_TARGET}"*/
) )
internal val defaultKotlinCommonArgs: List<String> = listOf( internal val defaultKotlinCommonArgs: List<String> = listOf(