46 lines
1.6 KiB
Groovy
46 lines
1.6 KiB
Groovy
pluginManagement {
|
|
repositories {
|
|
maven {
|
|
name = 'Fabric'
|
|
url = 'https://maven.fabricmc.net/'
|
|
}
|
|
gradlePluginPortal()
|
|
}
|
|
}
|
|
|
|
// #### Custom Settings ####
|
|
|
|
// Change the next line to disable local lib loading
|
|
def allowLocalLibUse = true
|
|
|
|
//When true, the local lib is also used in commandline builds
|
|
def allowLocalLibInConsoleMode = false
|
|
|
|
//The path were to look for the local BCLib
|
|
def WunderLibPath = '../WorldWeaver/WunderLib'
|
|
|
|
|
|
// #### Logic ####
|
|
def isIDE = properties.containsKey('android.injected.invoked.from.ide')
|
|
|| (System.getenv("XPC_SERVICE_NAME") ?: "").contains("intellij")
|
|
|| (System.getenv("XPC_SERVICE_NAME") ?: "").contains(".idea")
|
|
|| System.getenv("IDEA_INITIAL_DIRECTORY") != null
|
|
|
|
println "IntelliJ: ${isIDE}"
|
|
|
|
def WunderLibFolder = new File(WunderLibPath)
|
|
if (allowLocalLibUse && (isIDE || allowLocalLibInConsoleMode) && WunderLibFolder.exists()) {
|
|
println "Using local WunderLib from '${WunderLibFolder}' in IntelliJ"
|
|
println "If you do not want to load the local version of WunderLib"
|
|
println "either rename the Folder containing WunderLib to something"
|
|
println "else, or set 'allowLocalLibUse' in settings.gradle"
|
|
println "to false."
|
|
println ""
|
|
println "If you receive version-errors when launching minecraft"
|
|
println "in IntelliJ, make sure you have set up gradle instead"
|
|
println "of IntelliJ to compile and run."
|
|
|
|
include ':WunderLib'
|
|
project(":WunderLib").projectDir = WunderLibFolder
|
|
project(':WunderLib').buildFileName = './wunderlib-composit.gradle'
|
|
}
|