We use composite build to build and use gradle plugins and some shared libraries.
Something like this:
includeBuild “${gradle.ext.viewRoot}/QBuildSystemCore/qbsc”
gradle.rootProject { Project root →
root.beforeEvaluate { Project p ->
p.buildscript.dependencies.add("classpath", "com.amat.gradle:qbsc-plugins:1.0")
}
}
Somewhere else in one or more build script we use the compiled code:
repositories {
maven {
// this is how we use the composite build code
url IToolConfig.get(project).artifactsM.mavenAllURL
allowInsecureProtocol = true
}
}
The compsite build is Grooy+Java compiled with
plugins {
id ‘groovy’
id ‘java-gradle-plugin’
}
This works great since Gradle 4,5,6.
Now we are trying to move to Gradle 7.3.1
The code above
url IToolConfig.get(project).artifactsM.mavenAllURL
Causes an exception
at repositories_1e58uq9nbwsh323bjwc9kwihr.run(F:\views\g\1vg7\QBuildSystemCore\gradle\scripts\config\build.gradle:145)
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:91)
... 227 more
Caused by: java.lang.ClassNotFoundException: org.apache.groovy.nio.extensions.NioExtensions
… 281 more
Some more info, finnaly I found the “problematic” code
metaDataConfigFile.text
This is resolved into:
org.apache.groovy.nio.extensions.NioExtensions#getText(java.nio.file.Path)
Replacing it , solves the problem, of course this is not solution, I can’t replace all usage of groovy methods
Thanks
Boaz
Applied Materials, DevOps Architect