aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-01-12 21:34:58 +0800
committershedaniel <daniel@shedaniel.me>2020-01-12 21:34:58 +0800
commit14f068d3290db5b0210b49e2fb1d65d760b19002 (patch)
tree1dc4993956690da65ddb7f0defd0f4b3e6acf910 /build.gradle
parent421d0b0abd703367d6078f344def91ddfa24bdec (diff)
downloadRoughlyEnoughItems-14f068d3290db5b0210b49e2fb1d65d760b19002.tar.gz
RoughlyEnoughItems-14f068d3290db5b0210b49e2fb1d65d760b19002.tar.bz2
RoughlyEnoughItems-14f068d3290db5b0210b49e2fb1d65d760b19002.zip
improved recipe screen type setting
Diffstat (limited to 'build.gradle')
-rwxr-xr-xbuild.gradle29
1 files changed, 21 insertions, 8 deletions
diff --git a/build.gradle b/build.gradle
index f76853e5c..9da29a730 100755
--- a/build.gradle
+++ b/build.gradle
@@ -58,14 +58,27 @@ dependencies {
}
modApi("me.sargunvohra.mcmods:autoconfig1u:${project.autoconfig1u}")
if (includeDep) {
- include("me.shedaniel.cloth:cloth-events:${cloth_events_version}") {
- transitive = false
- }
- include("me.shedaniel.cloth:config-2:${cloth_config_version}") {
- transitive = false
- }
- include("me.sargunvohra.mcmods:autoconfig1u:${project.autoconfig1u}") {
- transitive = false
+ afterEvaluate {
+ def listAdded = []
+ def eachDep = { dep ->
+ for (apiIncludeDepStr in (api_include as String).split(',')) {
+ def apiIncludeGroup = apiIncludeDepStr.split(':')[0]
+ def apiIncludeDep = apiIncludeDepStr.split(':')[1]
+ if (dep.module.id.group == apiIncludeGroup && dep.module.id.name.startsWith(apiIncludeDep)) {
+ def version = dep.module.id.version.indexOf('@') >= 0 ? dep.module.id.version.substring(0, dep.module.id.version.indexOf('@')) : dep.module.id.version
+ def mavenDep = "${dep.module.id.group}:${dep.module.id.name}:$version"
+ if (!(mavenDep in listAdded)) {
+ include(mavenDep) {
+ transitive = false
+ }
+ listAdded.add(mavenDep)
+ }
+ break
+ }
+ }
+ }
+ configurations.compile.resolvedConfiguration.firstLevelModuleDependencies.each eachDep
+ configurations.runtimeClasspath.resolvedConfiguration.firstLevelModuleDependencies.each eachDep
}
}
modCompileOnly("io.github.prospector:modmenu:${modmenu_version}") {