Skip to content

Commit

Permalink
Constraint foojay-resolver version (GradleUp#946)
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler authored Jan 14, 2025
1 parent 82c4557 commit 5e6ab6e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
12 changes: 12 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ testing.suites {
implementation(libs.apache.maven.modelBuilder)
implementation(libs.moshi)
implementation(libs.moshi.kotlin)
// Used in test `plugins` blocks.
implementation(libs.foojayResolver)
}
}

Expand All @@ -126,6 +128,16 @@ gradlePlugin {
)
}

tasks.pluginUnderTestMetadata {
val functionalTestImplementation = configurations.named("functionalTestImplementation") {
isCanBeResolved = true
}
// Plugins used in tests could be resolved in classpath.
pluginClasspath.from(
functionalTestImplementation,
)
}

tasks.check {
dependsOn(
testing.suites.named("integrationTest"),
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ plexus-xml = "org.codehaus.plexus:plexus-xml:4.0.4"
xmlunit = "org.xmlunit:xmlunit-legacy:2.10.0"
moshi = { module = "com.squareup.moshi:moshi", version.ref = "moshi" }
moshi-kotlin = { module = "com.squareup.moshi:moshi-kotlin", version.ref = "moshi" }
foojayResolver = "org.gradle.toolchains.foojay-resolver-convention:org.gradle.toolchains.foojay-resolver-convention.gradle.plugin:0.9.0"

pluginPublish = "com.gradle.publish:plugin-publish-plugin:1.3.0"
mavenPublish = "com.vanniktech:gradle-maven-publish-plugin:0.30.0"
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ dependencyResolutionManagement {
includeGroupAndSubgroups("com.google")
}
}
gradlePluginPortal()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ApplicationPluginTest : BasePluginTest() {
""".trimIndent(),
settingsBlock = """
plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.9.0'
id 'org.gradle.toolchains.foojay-resolver-convention'
}
""".trimIndent(),
runShadowBlock = """
Expand Down

0 comments on commit 5e6ab6e

Please sign in to comment.