// Override this path when the parent checkout has a different name/location.
ext.parentProjectDir = file(providers.gradleProperty('parentProjectDir').getOrElse('../mydimension-template-1.20.1'))
def parentClasses = new File(parentProjectDir, 'build/classes/java/main')
def parentResources = new File(parentProjectDir, 'build/resources/main')
ext.parentResourcesDir = parentResources.exists() ? parentResources : parentClasses
sourceSets {
parentMod {
java.srcDirs = []
resources.srcDirs = []
output.classesDirs.setFrom(parentClasses)
output.resourcesDir = parentResourcesDir
}
}
// These outputs belong to the separately built parent. Empty-source Gradle tasks
// otherwise clean them before the addon development run.
tasks.named('compileParentModJava') { enabled = false }
tasks.named('processParentModResources') { enabled = false }
dependencies {
implementation sourceSets.parentMod.output
}
// Override this path when the parent checkout has a different name/location.
ext.parentProjectDir = file(providers.gradleProperty('parentProjectDir').getOrElse('../mydimension-template-1.20.1'))
def parentClasses = new File(parentProjectDir, 'build/classes/java/main')
def parentResources = new File(parentProjectDir, 'build/resources/main')
ext.parentResourcesDir = parentResources.exists() ? parentResources : parentClasses
sourceSets {
parentMod {
java.srcDirs = []
resources.srcDirs = []
output.classesDirs.setFrom(parentClasses)
output.resourcesDir = parentResourcesDir
}
}
// These outputs belong to the separately built parent. Empty-source Gradle tasks
// otherwise clean them before the addon development run.
tasks.named('compileParentModJava') { enabled = false }
tasks.named('processParentModResources') { enabled = false }
dependencies {
implementation sourceSets.parentMod.output
}