Merge remote-tracking branch 'origin/master'

This commit is contained in:
paulevsGitch 2021-08-14 18:39:53 +03:00
commit 19aee44357
3 changed files with 46 additions and 1 deletions

1
.gitignore vendored
View file

@ -27,6 +27,7 @@ bin/
# fabric
run/
run-client/
output/
*.getBlock("log")
Convert.class

View file

@ -17,6 +17,7 @@ targetCompatibility = JavaVersion.VERSION_16
archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
def local_bclib = findProject(':BCLib') != null
repositories {
maven { url "https://maven.dblsaiko.net/" }
@ -33,7 +34,13 @@ dependencies {
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
useApi "vazkii.patchouli:Patchouli:1.17-${project.patchouli_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-api-fabric:${project.rei_version}"

View file

@ -1,5 +1,6 @@
pluginManagement {
repositories {
jcenter()
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
@ -7,3 +8,39 @@ pluginManagement {
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'
}