Hi,
I am thinking to move lots of common plugin config move into a common gradle script.
My script looks like this
allprojects {
buildscript {
repositories {
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'com.diffplug.gradle.spotless:spotless:1.3.1'
}
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'com.diffplug.gradle.spotless'
spotless {
java {
eclipseFormatFile 'format.xml' // XML file dumped out by the Eclipse formatter
}
}
spotlessApply.dependsOn processResources
}
group = 'hello'
version = '1.0-SNAPSHOT'
In another script, I am using the apply from to access this common script.
The final build result looks like this
* What went wrong:
A problem occurred evaluating script.
> You can’t change configuration ‘classpath’ because it is already resolved!
Any idea how can I achieve this?
Br,
Tim