Skip to content

Commit

Permalink
Merge pull request #45 from bjhargrave/gradle-8.2
Browse files Browse the repository at this point in the history
Gradle 8.2
  • Loading branch information
bjhargrave committed Jul 18, 2023
2 parents 80a9784 + aa88c04 commit 04a0fe3
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 17 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,35 +38,34 @@ repositories {
}

// SourceSet for Kotlin DSL code so that it can be built after the main SourceSet
val dsl by sourceSets.registering
val dsl: SourceSet by sourceSets.creating
sourceSets {
dsl {
dsl.apply {
compileClasspath += main.get().output
runtimeClasspath += main.get().output
}
test {
compileClasspath += dsl.get().output
runtimeClasspath += dsl.get().output
compileClasspath += dsl.output
runtimeClasspath += dsl.output
}
}

configurations {
val dslCompileOnly by existing
dslCompileOnly {
dsl.compileOnlyConfigurationName {
extendsFrom(compileOnly.get())
}
val dslImplementation by existing
dslImplementation {
dsl.implementationConfigurationName {
extendsFrom(implementation.get())
}
val dslRuntimeOnly by existing
dslRuntimeOnly {
dsl.runtimeOnlyConfigurationName {
extendsFrom(runtimeOnly.get())
}
}

// Dependencies
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation("org.spockframework:spock-core:2.3-groovy-3.0")
testImplementation("biz.aQute.bnd:biz.aQute.bndlib:6.4.1")
}
Expand Down Expand Up @@ -173,12 +172,12 @@ tasks.withType<Javadoc>().configureEach {

tasks.pluginUnderTestMetadata {
// Include dsl SourceSet
pluginClasspath.from(dsl.get().output)
pluginClasspath.from(dsl.output)
}

tasks.jar {
// Include dsl SourceSet
from(dsl.get().output)
from(dsl.output)
// META-INF/maven folder
val metaInfMaven = publishing.publications.named<MavenPublication>("pluginMaven").map {
"META-INF/maven/${it.groupId}/${it.artifactId}"
Expand All @@ -197,7 +196,7 @@ tasks.jar {

tasks.named<Jar>("sourcesJar") {
// Include dsl SourceSet
from(dsl.get().allSource)
from(dsl.allSource)
}

val testresourcesOutput = layout.buildDirectory.dir("testresources")
Expand Down Expand Up @@ -239,3 +238,8 @@ tasks.test {
tasks.named<Delete>("cleanTest") {
delete(testresourcesOutput)
}

tasks.withType<ValidatePlugins>().configureEach {
failOnWarning.set(true)
enableStricterValidation.set(true)
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
5 changes: 4 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
Expand Down

0 comments on commit 04a0fe3

Please sign in to comment.