From 84998f01fb6183d75b1faf7486de781b2b50054d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=81=AA=E8=81=AA?= <178666380@qq.com> Date: Thu, 13 Jul 2017 22:50:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=93=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 55 +++++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/build.gradle b/build.gradle index a241261..2e83be5 100644 --- a/build.gradle +++ b/build.gradle @@ -296,34 +296,37 @@ publishing { } } -tasks.generateProjectCauldron << { - def file = new File('eclipse/cauldron/build.gradle') - file.append(''' -repositories { - clear() - maven { - name 'yumc' - url 'http://repo.yumc.pw/content/groups/public/' - } - maven { - name 'forge' - url 'http://files.minecraftforge.net/maven' - } - maven { - name 'minecraft' - url 'https://libraries.minecraft.net/' - } - mavenCentral() -} -dependencies { -''') - configurations.libraries.resolvedConfiguration.resolvedArtifacts.collect { it.moduleVersion.id }.each { module -> - if (['net.minecraft:server:', 'org.ow2.asm:asm-all'].findAll { (module as String).startsWith it }.size() > 0) { - return +tasks.generateProjectCauldron { + doLast { + def file = new File('eclipse/cauldron/build.gradle') + file.append(''' + repositories { + mavenLocal() + mavenCentral() + maven { + name 'yumc' + url 'http://repo.yumc.pw/content/groups/public/' } - file.append(" compile '${module}'\n") + maven { + name 'forge' + url 'http://files.minecraftforge.net/maven' + } + maven { + name 'minecraft' + url 'https://libraries.minecraft.net/' + } + + } + dependencies { + ''') + configurations.libraries.resolvedConfiguration.resolvedArtifacts.collect { it.moduleVersion.id }.each { module -> + if (['net.minecraft:server:', 'org.ow2.asm:asm-all'].findAll { (module as String).startsWith it }.size() > 0) { + return + } + file.append(" compile '${module}'\n") + } + file.append('}') } - file.append('}') } task resolveAllDependencies {