Skip to content

Commit

Permalink
Merge pull request #90 from sschuberth/avoid-eager-compile-task-confi…
Browse files Browse the repository at this point in the history
…guration

Avoid eager configuration of the `KotlinCompile` task
  • Loading branch information
bigdaz authored Dec 27, 2023
2 parents 1e39046 + a99ecd6 commit d4c2b3b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
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=3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionSha256Sum=9d926787066a081739e8200858338b4a69e837c3a821a33aca9db09dd4a41026
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
30 changes: 15 additions & 15 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ java {
targetCompatibility = JavaVersion.VERSION_1_8
}

tasks.withType<KotlinCompile> {
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
apiVersion.set(KotlinVersion.KOTLIN_1_3)
languageVersion.set(KotlinVersion.KOTLIN_1_3)
jvmTarget.set(JvmTarget.JVM_1_8)
apiVersion = KotlinVersion.KOTLIN_1_3
languageVersion = KotlinVersion.KOTLIN_1_3
jvmTarget = JvmTarget.JVM_1_8
}
}

Expand All @@ -77,7 +77,7 @@ tasks.withType<PluginUnderTestMetadata>().configureEach {
}

val shadowJarTask = tasks.named<ShadowJar>("shadowJar") {
archiveClassifier.set("")
archiveClassifier = ""
configurations = listOf(shadowImplementation)
val projectGroup = project.group
doFirst {
Expand Down Expand Up @@ -133,8 +133,8 @@ tasks.named("jar").configure {
* Configuration for publishing the plugin, locally and to the Gradle Plugin Portal.
*/
gradlePlugin {
website.set("https://github.com/gradle/github-dependency-graph-gradle-plugin")
vcsUrl.set("https://github.com/gradle/github-dependency-graph-gradle-plugin")
website = "https://github.com/gradle/github-dependency-graph-gradle-plugin"
vcsUrl = "https://github.com/gradle/github-dependency-graph-gradle-plugin"

plugins {
create("dependencyGraphPlugin") {
Expand Down Expand Up @@ -162,8 +162,8 @@ publishing {
}

tasks.withType(ValidatePlugins::class).configureEach {
failOnWarning.set(true)
enableStricterValidation.set(true)
failOnWarning = true
enableStricterValidation = true
}

signing {
Expand All @@ -189,16 +189,16 @@ fun loadReleaseNotes():String {
}

val createReleaseTag = tasks.register<CreateGitTag>("createReleaseTag") {
tagName.set(releaseTag)
tagName = releaseTag
}

githubRelease {
setToken(System.getenv("GITHUB_DEPENDENCY_GRAPH_GIT_TOKEN") ?: "")
owner.set("gradle")
repo.set("github-dependency-graph-gradle-plugin")
releaseName.set(releaseVersion)
tagName.set(releaseTag)
body.set(releaseNotes)
owner = "gradle"
repo = "github-dependency-graph-gradle-plugin"
releaseName = releaseVersion
tagName = releaseTag
body = releaseNotes
}

tasks.named("githubRelease").configure {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ abstract class AbstractDependencyExtractorPlugin : Plugin<Gradle> {
gradle.rootProject { project ->
dependencyExtractorProvider
.get()
.rootProjectBuildDirectory = project.buildDir
.rootProjectBuildDirectory = project.layout.buildDirectory.get().asFile
}

// Register the service to listen for Build Events
Expand Down
2 changes: 1 addition & 1 deletion sample-projects/java-included-builds/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies {
}

application {
mainClass.set("org.example.java.app.app.App")
mainClass = "org.example.java.app.app.App"
}

tasks.named<Test>("test") {
Expand Down

0 comments on commit d4c2b3b

Please sign in to comment.