diff --git a/buildSrc/src/main/kotlin/Compiler.kt b/buildSrc/src/main/kotlin/Compiler.kt index 3d4cc2614d16..48a5f1d5bb96 100644 --- a/buildSrc/src/main/kotlin/Compiler.kt +++ b/buildSrc/src/main/kotlin/Compiler.kt @@ -1,6 +1,7 @@ import kotlinx.atomicfu.plugin.gradle.AtomicFUPluginExtension import org.gradle.api.Project import org.gradle.api.artifacts.VersionCatalogsExtension +import org.gradle.kotlin.dsl.assign import org.gradle.kotlin.dsl.configure import org.gradle.kotlin.dsl.getByType import org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerOptions @@ -26,7 +27,7 @@ object Jvm { fun KotlinCommonCompilerOptions.applyKordCompilerOptions() { // TODO: set to true again once https://github.com/Kotlin/kotlinx-atomicfu/issues/289 is fixed - allWarningsAsErrors.set(false) + allWarningsAsErrors = false freeCompilerArgs.add("-progressive") } diff --git a/buildSrc/src/main/kotlin/Documentation.kt b/buildSrc/src/main/kotlin/Documentation.kt index db5da77659e5..bd70ae5ca72b 100644 --- a/buildSrc/src/main/kotlin/Documentation.kt +++ b/buildSrc/src/main/kotlin/Documentation.kt @@ -1,19 +1,20 @@ +import org.gradle.kotlin.dsl.assign import org.jetbrains.dokka.gradle.AbstractDokkaLeafTask import java.net.URL fun AbstractDokkaLeafTask.applyKordDokkaOptions() { - failOnWarning.set(true) + failOnWarning = true dokkaSourceSets.configureEach { - jdkVersion.set(Jvm.target) + jdkVersion = Jvm.target - suppressGeneratedFiles.set(false) + suppressGeneratedFiles = false sourceLink { - localDirectory.set(project.projectDir) - remoteUrl.set(URL("https://github.com/kordlib/kord/blob/${Library.commitHashOrDefault("0.9.x")}/${project.name}")) - remoteLineSuffix.set("#L") + localDirectory = project.projectDir + remoteUrl = URL("https://github.com/kordlib/kord/blob/${Library.commitHashOrDefault("0.9.x")}/${project.name}") + remoteLineSuffix = "#L" } externalDocumentationLink("https://kotlinlang.org/api/kotlinx.coroutines/") @@ -26,8 +27,8 @@ fun AbstractDokkaLeafTask.applyKordDokkaOptions() { // don't list `TweetNaclFast` in docs perPackageOption { - matchingRegex.set("""com\.iwebpp\.crypto""") - suppress.set(true) + matchingRegex = """com\.iwebpp\.crypto""" + suppress = true } } } diff --git a/buildSrc/src/main/kotlin/kord-publishing.gradle.kts b/buildSrc/src/main/kotlin/kord-publishing.gradle.kts index 593dd1348b86..0cfe3d9a3702 100644 --- a/buildSrc/src/main/kotlin/kord-publishing.gradle.kts +++ b/buildSrc/src/main/kotlin/kord-publishing.gradle.kts @@ -6,7 +6,7 @@ plugins { } val dokkaJar by tasks.registering(Jar::class) { - archiveClassifier.set("javadoc") + archiveClassifier = "javadoc" from(tasks.named("dokkaHtml")) } @@ -19,37 +19,37 @@ publishing { version = Library.version pom { - name.set(Library.name) - description.set(Library.description) - url.set(Library.projectUrl) + name = Library.name + description = Library.description + url = Library.projectUrl organization { - name.set("Kord") - url.set("https://github.com/kordlib") + name = "Kord" + url = "https://github.com/kordlib" } developers { developer { - name.set("The Kord Team") + name = "The Kord Team" } } issueManagement { - system.set("GitHub") - url.set("https://github.com/kordlib/kord/issues") + system = "GitHub" + url = "https://github.com/kordlib/kord/issues" } licenses { license { - name.set("MIT") - url.set("http://opensource.org/licenses/MIT") + name = "MIT" + url = "http://opensource.org/licenses/MIT" } } scm { - connection.set("scm:git:ssh://github.com/kordlib/kord.git") - developerConnection.set("scm:git:ssh://git@github.com:kordlib/kord.git") - url.set(Library.projectUrl) + connection = "scm:git:ssh://github.com/kordlib/kord.git" + developerConnection = "scm:git:ssh://git@github.com:kordlib/kord.git" + url = Library.projectUrl } } } diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 3975a46823f0..624f44ac9af9 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -1,4 +1,3 @@ -@Suppress("DSL_SCOPE_VIOLATION") // false positive for `libs` in IntelliJ plugins { `kord-multiplatform-module` `kord-publishing` diff --git a/gradle.properties b/gradle.properties index b28460e2ab10..ef230821e589 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,7 @@ #dokka will run out of memory with the default meta space org.gradle.jvmargs=-XX:MaxMetaspaceSize=1024m org.gradle.parallel=true +systemProp.org.gradle.unsafe.kotlin.assignment=true kotlin.code.style=official # https://github.com/Kotlin/kotlinx-atomicfu#atomicfu-compiler-plugin diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index ccebba7710de..c1962a79e29d 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 19acfb4ef2f6..8196ca1994f9 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=ff7bf6a86f09b9b2c40bb8f48b25fc19cf2b2664fd1d220cd7ab833ec758d0d7 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionSha256Sum=a62c5f99585dd9e1f95dab7b9415a0e698fa9dd1e6c38537faa81ac078f4d23e +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 79a61d421cc4..aeb74cbb43e3 100755 --- a/gradlew +++ b/gradlew @@ -85,9 +85,6 @@ done APP_BASE_NAME=${0##*/} APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -197,6 +194,10 @@ if "$cygwin" || "$msys" ; then done fi + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in