Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Gradle 8.1 #783

Merged
merged 9 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion buildSrc/src/main/kotlin/Compiler.kt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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")
}

Expand Down
17 changes: 9 additions & 8 deletions buildSrc/src/main/kotlin/Documentation.kt
Original file line number Diff line number Diff line change
@@ -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/")
Expand All @@ -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
}
}
}
28 changes: 14 additions & 14 deletions buildSrc/src/main/kotlin/kord-publishing.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
}

val dokkaJar by tasks.registering(Jar::class) {
archiveClassifier.set("javadoc")
archiveClassifier = "javadoc"
from(tasks.named("dokkaHtml"))
}

Expand All @@ -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
}
}
}
Expand Down
1 change: 0 additions & 1 deletion common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@Suppress("DSL_SCOPE_VIOLATION") // false positive for `libs` in IntelliJ
plugins {
`kord-multiplatform-module`
`kord-publishing`
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
7 changes: 4 additions & 3 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down