Added Wunderlib
This commit is contained in:
parent
3d74113c2b
commit
3ed04c8b67
18 changed files with 118 additions and 81 deletions
|
@ -1,9 +1,46 @@
|
|||
pluginManagement {
|
||||
repositories {
|
||||
maven {
|
||||
name = 'Fabric'
|
||||
url = 'https://maven.fabricmc.net/'
|
||||
}
|
||||
gradlePluginPortal()
|
||||
}
|
||||
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 = '../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'
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue