check: throw GradleException if api folder is not exist

This commit is contained in:
PeTcHeNkA authored and GitHub committed 2025-12-20 02:43:42 +03:00
1 parent e767f4f46c
commit 63ca8da22c
1 file changed
+7 -5
+7 -5
View File
@@ -31,12 +31,14 @@ tasks.create('buildNoMixin', Exec) {
commandLine gradleWrapper, 'build', '-Pnomixin'
}
sourceSets {
named("main").configure {
java {
srcDirs += ['src/api/java']
}
sourceSets.main.java {
def apiDir = file('src/api/java')
if (!apiDir.exists()) {
throw new GradleException("Missing API sources: Run './gradlew updateAPI' or enable checkout submodules in CI.")
}
srcDirs += apiDir
}
// Modify the existing 'build' task to depend on 'updateAPI'