Gradle7 Version Catalog: How to use it with buildSrc?

With Gradle 7.3.3, it is possible. Note version catalogs are GA since Gradle 7.4 The code snippet assumes Gradle is at least 7.4, but if you need them prior that version, insert enableFeaturePreview(“VERSION_CATALOGS”) at the beginning of each settings.gradle.kts. Using buildSrc buildSrc/settings.gradle.kts dependencyResolutionManagement { versionCatalogs { create(“libs”) { from(files(“../gradle/libs.versions.toml”)) } } } buildSrc/build.gradle.kts dependencies { … Read more

Gradle – add directory to classpath

The application plugin documentation says: Static files to be added to the distribution can be simply added to src/dist I would try putting your config directory into src/dist/lib and continue adding it to your classpath with runtime files(‘src/dist/lib/config’) Note: working around this defect means that config has to go into /lib under src/dist