mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 13:09:11 +00:00
check: throw GradleException if api folder is not exist
This commit is contained in:
1 parent
e767f4f46c
commit
63ca8da22c
1 file changed
+7
-5
+7
-5
@@ -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'
|
||||
|
||||
Reference in new issue
Block a user