GH-11819: Exclude MR-JAR sourceSet and folders from Idea Sync (#11836)

This commit is contained in:
Uwe Schindler 2022-10-04 11:49:39 +02:00 committed by GitHub
parent 6bd8733fdb
commit f54fddc89f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 0 deletions

View File

@ -37,6 +37,21 @@ if (isIdea) {
}
}
if (isIdeaSync) {
allprojects {
// disable all MR-JAR folders by hiding them from IDE after evaluation:
plugins.withType(JavaPlugin) {
sourceSets.matching{ it.name ==~ /main\d+/ }.all{ SourceSet sourceSet ->
project.afterEvaluate {
logger.lifecycle("Skipping MR-JAR sourceSet on IntelliJ Idea: " + sourceSet.name)
sourceSet.java.srcDirs = []
sourceSet.resources.srcDirs = []
}
}
}
}
}
if (isIdeaBuild) {
// Skip certain long tasks that are dependencies
// of 'assemble' if we're building from within IntelliJ.