Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
19aee44357
3 changed files with 46 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -27,6 +27,7 @@ bin/
|
||||||
# fabric
|
# fabric
|
||||||
|
|
||||||
run/
|
run/
|
||||||
|
run-client/
|
||||||
output/
|
output/
|
||||||
*.getBlock("log")
|
*.getBlock("log")
|
||||||
Convert.class
|
Convert.class
|
||||||
|
|
|
@ -17,6 +17,7 @@ targetCompatibility = JavaVersion.VERSION_16
|
||||||
archivesBaseName = project.archives_base_name
|
archivesBaseName = project.archives_base_name
|
||||||
version = project.mod_version
|
version = project.mod_version
|
||||||
group = project.maven_group
|
group = project.maven_group
|
||||||
|
def local_bclib = findProject(':BCLib') != null
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven { url "https://maven.dblsaiko.net/" }
|
maven { url "https://maven.dblsaiko.net/" }
|
||||||
|
@ -33,7 +34,13 @@ dependencies {
|
||||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||||
|
|
||||||
useApi "vazkii.patchouli:Patchouli:1.17-${project.patchouli_version}"
|
useApi "vazkii.patchouli:Patchouli:1.17-${project.patchouli_version}"
|
||||||
useApi "com.github.paulevsGitch:BCLib:${project.bclib_version}"
|
println "Using local BCLib: ${local_bclib}"
|
||||||
|
if (local_bclib){
|
||||||
|
compileOnly(project(":BCLib"))
|
||||||
|
modRuntimeMapped(project(":BCLib"))
|
||||||
|
} else {
|
||||||
|
useApi "com.github.paulevsGitch:BCLib:${project.bclib_version}"
|
||||||
|
}
|
||||||
|
|
||||||
useOptional "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}"
|
useOptional "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}"
|
||||||
useOptional "me.shedaniel:RoughlyEnoughItems-api-fabric:${project.rei_version}"
|
useOptional "me.shedaniel:RoughlyEnoughItems-api-fabric:${project.rei_version}"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
pluginManagement {
|
pluginManagement {
|
||||||
repositories {
|
repositories {
|
||||||
|
jcenter()
|
||||||
maven {
|
maven {
|
||||||
name = 'Fabric'
|
name = 'Fabric'
|
||||||
url = 'https://maven.fabricmc.net/'
|
url = 'https://maven.fabricmc.net/'
|
||||||
|
@ -7,3 +8,39 @@ pluginManagement {
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// #### Custom Settings ####
|
||||||
|
|
||||||
|
//Change the next line to disable local BCLib loading
|
||||||
|
def allowLocalLibUse = false
|
||||||
|
|
||||||
|
//When true, the local BCLib is also used in commandline builds
|
||||||
|
def allowLocalLibInConsoleMode = false
|
||||||
|
|
||||||
|
//The path were to look for the local BCLib
|
||||||
|
def BCLibPath = '../BCLib'
|
||||||
|
|
||||||
|
|
||||||
|
// #### 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 BCLibFolder = new File( BCLibPath )
|
||||||
|
if( allowLocalLibUse && (isIDE || allowLocalLibInConsoleMode) && BCLibFolder.exists() ) {
|
||||||
|
println "Using local BCLib from '${BCLibFolder}' in IntelliJ"
|
||||||
|
println "If you do not want to load the local version of BClib"
|
||||||
|
println "either rename the Folder containing BCLib 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 ':BCLib'
|
||||||
|
project(":BCLib").projectDir = BCLibFolder
|
||||||
|
project(':BCLib').buildFileName = './bclib-composit.gradle'
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue