Skip to content
Open
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
15 changes: 12 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,20 @@ plugins {
id("io.codearte.nexus-staging") version "0.30.0"
`maven-publish`
signing
idea
}

allprojects {
plugins.apply("org.gradle.idea")
repositories {
mavenCentral()
}
idea {
module {
isDownloadJavadoc = true
isDownloadSources = true
}
}
}

group = "de.joshuagleitze"
Expand Down Expand Up @@ -45,7 +53,7 @@ subprojects {
if (plugins.hasPlugin("org.jetbrains.kotlin.jvm")) {
tasks.test {
useJUnitPlatform()
reports.junitXml.isEnabled = true
reports.junitXml.required.set(true)
}

java {
Expand Down Expand Up @@ -168,8 +176,8 @@ subprojects {
}
}

val publishToGithub = tasks.named("publishAllPublicationsTo${githubPackages.name.capitalize()}Repository")
val publishToMavenCentral = tasks.named("publishTo${mavenCentral.name.capitalize()}")
val publishToGithub = tasks.named("publishAllPublicationsTo${githubPackages.name.firstUpper()}Repository")
val publishToMavenCentral = tasks.named("publishTo${mavenCentral.name.firstUpper()}")

signing {
val signingKey: String? by project
Expand Down Expand Up @@ -209,5 +217,6 @@ subprojects {

val Project.isSnapshot get() = versionDetails.commitDistance != 0
fun String.drop(prefix: String) = if (this.startsWith(prefix)) this.drop(prefix.length) else this
fun String.firstUpper() = this.replaceFirstChar { it.titlecase() }
val Project.versionDetails get() = (this.extra["versionDetails"] as groovy.lang.Closure<*>)() as com.palantir.gradle.gitversion.VersionDetails
val Project.willBePublished get() = this.extra.properties["willBePublished"] as Boolean? ?: false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists