This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_4_0_X by this push:
new 1ae3888dd3 later gradle syntax
1ae3888dd3 is described below
commit 1ae3888dd314fbded8d9f13273be7110fa3bc82d
Author: Paul King <[email protected]>
AuthorDate: Mon Apr 14 22:19:44 2025 +1000
later gradle syntax
---
.../groovy/org/apache/groovy/gradle/GroovyLibraryExtension.groovy | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/build-logic/src/main/groovy/org/apache/groovy/gradle/GroovyLibraryExtension.groovy
b/build-logic/src/main/groovy/org/apache/groovy/gradle/GroovyLibraryExtension.groovy
index 83b58617ca..d134882796 100644
---
a/build-logic/src/main/groovy/org/apache/groovy/gradle/GroovyLibraryExtension.groovy
+++
b/build-logic/src/main/groovy/org/apache/groovy/gradle/GroovyLibraryExtension.groovy
@@ -152,8 +152,11 @@ class GroovyLibraryExtension {
}
void registerOptionalFeature(String name) {
+ def sourceSet = javaPluginExtension.sourceSets.create(name)
+ def main = javaPluginExtension.sourceSets.getByName('main')
+ main.compileClasspath += sourceSet.compileClasspath
javaPluginExtension.registerFeature(name) {
- it.usingSourceSet(javaPluginExtension.sourceSets.getByName("main"))
+ it.usingSourceSet(sourceSet)
}
AdhocComponentWithVariants component = findComponent()
def apiElements = configurations.getByName("${name}ApiElements")