|
1 |
| -buildscript { |
2 |
| - dependencies { |
3 |
| - classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true |
4 |
| - } |
5 |
| -} |
6 |
| - |
7 | 1 | plugins {
|
8 | 2 | id 'java'
|
9 | 3 | id 'eclipse'
|
10 | 4 | id 'io.freefair.lombok' version '6.5.0.2'
|
11 |
| - id 'wtf.gofancy.fancygradle' version '1.+' |
12 | 5 | id 'org.cadixdev.licenser' version '0.6.1'
|
| 6 | + id 'net.galacticraft.internal.maven' version '1.0.0' |
| 7 | + id 'net.galacticraft.internal.legacy.defaults' version '1.0.0' |
13 | 8 | }
|
14 | 9 |
|
15 |
| -apply plugin: 'net.minecraftforge.gradle' |
16 | 10 | java.toolchain.languageVersion = JavaLanguageVersion.of(8)
|
17 | 11 |
|
18 | 12 | group = "micdoodle8.mods.galacticraft"
|
19 | 13 | archivesBaseName = "Galacticraft"
|
20 | 14 |
|
21 |
| -version = '4.0.4-SNAPSHOT' |
| 15 | +version = "${mod_version}${version_suffix}" |
22 | 16 |
|
23 | 17 | repositories {
|
24 | 18 | mavenCentral()
|
25 | 19 | maven {
|
26 | 20 | name 'galacticraft'
|
27 |
| - url 'https://maven.galacticraft.net/repository/legacy-common/' |
28 |
| - } |
29 |
| - maven { |
30 |
| - name 'buildcraft' |
31 |
| - url 'https://mod-buildcraft.com/maven/' |
32 |
| - content { includeGroup 'com.mod-buildcraft' } |
33 |
| - } |
34 |
| - maven { |
35 |
| - name 'ic2' |
36 |
| - url 'https://maven.ic2.player.to' |
37 |
| - content { includeGroup 'net.industrial-craft' } |
38 |
| - } |
39 |
| - maven { |
40 |
| - name 'prog' |
41 |
| - url 'https://dvs1.progwml6.com/files/maven' |
42 |
| - content { includeGroup 'mezz.jei' } |
43 |
| - } |
44 |
| - maven { |
45 |
| - name 'opencomputers' |
46 |
| - url 'https://maven.cil.li/' |
47 |
| - content { includeGroup 'li.cil.oc' } |
48 |
| - } |
49 |
| - maven { |
50 |
| - name 'BlameJared - Crafttweaker' |
51 |
| - url 'https://maven.blamejared.com/' |
52 |
| - content { includeGroup 'CraftTweaker2' } |
53 |
| - } |
54 |
| - maven { |
55 |
| - name 'cc-tweaked' |
56 |
| - url 'https://squiddev.cc/maven/' |
57 |
| - content { includeGroup 'org.squiddev' } |
58 |
| - } |
59 |
| - |
60 |
| - all { |
61 |
| - ArtifactRepository repo -> |
62 |
| - if (repo instanceof MavenArtifactRepository) { |
63 |
| - if ((repo.url.toString() == 'files.minecraftforge.net') || |
64 |
| - (repo.url.toString() == 'maven.minecraftforge.net')) { |
65 |
| - remove repo |
66 |
| - } |
67 |
| - } |
| 21 | + url 'https://maven.galacticraft.net/repository/legacy-common/' |
68 | 22 | }
|
69 | 23 | }
|
70 | 24 |
|
71 | 25 | configurations {
|
72 |
| - compileOnly.extendsFrom compileMod |
| 26 | + compileOnly.extendsFrom compileRequire |
73 | 27 | }
|
74 | 28 |
|
75 | 29 | dependencies {
|
76 | 30 | minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}"
|
77 |
| - |
78 |
| - compileMod fg.deobf('mod.dependency:biomes-o-plenty:7.0.1.2445') |
79 |
| - compileMod fg.deobf('mod.dependency:mekanism:9.8.3.390') |
80 |
| - compileMod fg.deobf('mod.dependency:appliedenergistics2:rv6-stable-7') |
81 |
| - compileMod fg.deobf('mod.dependency:redstoneflux:2.1.1.1') |
82 |
| - compileMod fg.deobf('mod.dependency:actuallyadditions:r152') |
83 |
| - compileMod fg.deobf('mod.dependency:playerapi:1.1') |
84 |
| - compileMod fg.deobf('mod.dependency:industrialcraft-2:2.8.222-ex112') |
85 |
| - compileMod fg.deobf('mod.dependency:journeymap:5.7.1') |
86 |
| - compileMod fg.deobf('mod.dependency:buildcraft-api:7.99.24.8') |
87 |
| - compileMod fg.deobf('mod.dependency:jei:4.16.1.302:api') |
88 |
| - runtimeOnly fg.deobf('mod.dependency:jei:4.16.1.302') |
89 |
| -} |
90 |
| - |
91 |
| -minecraft { |
92 |
| - mappings channel: "${mapping_channel}", version: "${mapping_version}" |
93 | 31 |
|
94 |
| - accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') |
95 |
| - |
96 |
| - runs { |
97 |
| - client { |
98 |
| - workingDirectory project.file('run') |
99 |
| - property 'forge.logging.markers', 'REGISTRIES' |
100 |
| - property 'forge.logging.console.level', 'debug' |
101 |
| - if (project.hasProperty('uuid')) |
102 |
| - args '--uuid', project.getProperty('uuid') |
103 |
| - if (project.hasProperty('username')) |
104 |
| - args '--username', project.getProperty('username') |
105 |
| - jvmArg '-Dfml.coreMods.load=micdoodle8.mods.miccore.MicdoodlePlugin' |
106 |
| - } |
107 |
| - server { |
108 |
| - workingDirectory project.file('run') |
109 |
| - property 'forge.logging.markers', 'REGISTRIES' |
110 |
| - property 'forge.logging.console.level', 'debug' |
111 |
| - jvmArg '-Dfml.coreMods.load=micdoodle8.mods.miccore.MicdoodlePlugin' |
112 |
| - } |
113 |
| - } |
114 |
| -} |
115 |
| - |
116 |
| -fancyGradle { |
117 |
| - patches { |
118 |
| - resources |
119 |
| - coremods |
120 |
| - asm |
121 |
| - } |
122 |
| -} |
123 |
| - |
124 |
| -def setManifest = { Manifest manifest-> |
125 |
| - manifest.attributes( |
126 |
| - [ |
127 |
| - 'Specification-Title' : 'Galacticraft', |
128 |
| - 'Specification-Vendor' : 'TeamGalacticraft', |
129 |
| - 'Specification-Version' : "${version}", |
130 |
| - 'Implementation-Title' : 'Galacticraft', |
131 |
| - 'Implementation-Version' : "${version}", |
132 |
| - 'Implementation-Vendor' : 'TeamGalacticraft', |
133 |
| - 'Implementation-Build-Date' : new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), |
134 |
| - 'FMLAT' : 'accesstransformer.cfg', |
135 |
| - 'FMLCorePluginContainsFMLMod' : 'true', |
136 |
| - 'FMLCorePlugin' : 'micdoodle8.mods.miccore.MicdoodlePlugin', |
137 |
| - 'Built-On-Minecraft' : "${mc_version}", |
138 |
| - 'Built-On-Forge' : "${forge_version}", |
139 |
| - 'Built-On-Mapping' : "${mapping_channel}-${mapping_version}", |
140 |
| - 'Built-Using' : "ForgeGradle: 5.1.+" |
141 |
| - ] as LinkedHashMap |
142 |
| - ) |
143 |
| -} |
144 |
| - |
145 |
| -jar { |
146 |
| - manifest(setManifest) |
147 |
| - archiveVersion.set("${mc_version}-${version}") |
148 |
| -} |
149 |
| - |
150 |
| -jar.finalizedBy('reobfJar') |
151 |
| - |
152 |
| -task sourcesJar(type: Jar, dependsOn: classes) { |
153 |
| - duplicatesStrategy(DuplicatesStrategy.FAIL) |
154 |
| - archiveClassifier.set('sources') |
155 |
| - archiveVersion.set("${mc_version}-${version}") |
156 |
| - from sourceSets.main.allSource |
157 |
| -} |
158 |
| - |
159 |
| -task deobfJar(type: Jar) { |
160 |
| - duplicatesStrategy(DuplicatesStrategy.FAIL) |
161 |
| - archiveClassifier.set('deobf') |
162 |
| - archiveVersion.set("${mc_version}-${version}") |
163 |
| - from sourceSets.main.output |
164 |
| - from sourceSets.main.allJava |
165 |
| - manifest(setManifest) |
166 |
| -} |
167 |
| - |
168 |
| -task mavenJar(type: Jar) { |
169 |
| - duplicatesStrategy(DuplicatesStrategy.INCLUDE) |
170 |
| - manifest(setManifest) |
171 |
| - archiveVersion.set("${mc_version}-${version}-maven") |
172 |
| - from(sourceSets.main.output) { |
173 |
| - exclude 'micdoodle8/mods/miccore/IntCache.*' |
174 |
| - } |
175 |
| - from("${projectDir}/etc/replace") { |
176 |
| - include 'IntCache.class' |
177 |
| - into 'micdoodle8/mods/miccore' |
178 |
| - } |
179 |
| -} |
180 |
| - |
181 |
| -artifacts { |
182 |
| - archives deobfJar |
183 |
| - archives sourcesJar |
184 |
| - archives mavenJar |
| 32 | + compileRequire fg.deobf('mod.dependency:mekanism:9.8.3.390') |
| 33 | + compileRequire fg.deobf('mod.dependency:industrialcraft-2:2.8.222-ex112') |
| 34 | + compileRequire fg.deobf('mod.dependency:buildcraft-api:7.99.24.8') |
| 35 | + compileOnly fg.deobf('mod.dependency:biomes-o-plenty:7.0.1.2445') |
| 36 | + compileOnly fg.deobf('mod.dependency:appliedenergistics2:rv6-stable-7') |
| 37 | + compileOnly fg.deobf('mod.dependency:redstoneflux:2.1.1.1') |
| 38 | + compileOnly fg.deobf('mod.dependency:actuallyadditions:r152') |
| 39 | + compileOnly fg.deobf('mod.dependency:playerapi:1.1') |
| 40 | + compileOnly fg.deobf('mod.dependency:journeymap:5.7.1') |
| 41 | + compileOnly fg.deobf('mod.dependency:jei:4.16.1.302:api') |
| 42 | + runtimeOnly fg.deobf('mod.dependency:jei:4.16.1.302') |
185 | 43 | }
|
186 | 44 |
|
187 |
| -apply from: 'gradle/maven.gradle' |
188 | 45 | apply from: 'gradle/resources.gradle'
|
189 | 46 |
|
190 | 47 | license {
|
191 |
| - header = project.file('etc/license/HEADER') |
| 48 | + header = project.file('etc/HEADER') |
192 | 49 | properties {
|
193 | 50 | company = 'Team Galacticraft'
|
194 | 51 | year = Calendar.getInstance().get(Calendar.YEAR);
|
|
0 commit comments