Sergey Chernov
10/31/2024, 9:40 AMbuildSrc towards includeBuild("build-logic"), but there are few leftovers. In build.gradle scripts we have import statements like
import com.acme.gradle.transform.UnzipTransform
dependencies.registerTransform(UnzipTransform) {
from.attribute(ArtifactTypeDefinition.ARTIFACT_TYPE_ATTRIBUTE, "jar")
to.attribute(ArtifactTypeDefinition.ARTIFACT_TYPE_ATTRIBUTE, "unzipped")
}
or
import com.acme.gradle.sql.ImportSqlDump
...
tasks.register('importInterchangeDump', ImportSqlDump) {
database = "acquiring"
username = "${db.adminUser}"
password = "${db.adminPassword}"
importFiles = [project.projectDir.toPath().resolve("db/dump/interchange.sql.gz").toFile()]
}
For this reason we cannot drop the buildSrc directory, which now only has build.gradle with several declared dependencies for scripts.
More or less I understand we should move towards a mix of plugins imported by their id + extensions declaring parameters. Any other guidelines advised there?Vampire
10/31/2024, 9:51 AMbuildscript block of the respective build script.
Or you could e.g. have the dependencies in the build of any project in build-logic and then apply a plugin from that project that does nothing in apply.
Or you could e.g. have the dependencies in the build of any project in build-logic and then "apply" any plugin from that project with "`apply false`".Vampire
10/31/2024, 9:53 AMSergey Chernov
10/31/2024, 9:55 AM