-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
executable file
·154 lines (126 loc) · 3.85 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
import org.apache.tools.ant.filters.ReplaceTokens
import java.nio.file.Paths
buildscript {
repositories {
maven { url = 'https://maven.minecraftforge.net' }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
}
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'maven-publish'
apply plugin: 'idea'
version = "2.3.2"
group = "refinedstorage"
def tokens = [VERSION: project.version]
def included = ['com/raoulvdberge/refinedstorage/RS.java']
def expandedSrc = new File(project.buildDir, 'expandedSrc')
def srcMainJava = project.file('src/main/java').toPath()
def includedPaths = included.collect { Paths.get(it) }
task javaReplaceTokens(type: Copy) {
inputs.property 'tokens', tokens
from(srcMainJava) {
include included
}
into expandedSrc
filter(ReplaceTokens, beginToken: '@', endToken: '@', tokens: tokens)
}
compileJava {
dependsOn javaReplaceTokens
exclude {
srcMainJava.relativize(it.file.toPath()) in includedPaths
}
source expandedSrc
}
java {
archivesBaseName = "morerefinedstorage"
toolchain.languageVersion = JavaLanguageVersion.of(8)
}
minecraft {
mappings channel: 'stable', version: '39-1.12'
accessTransformer = file('src/main/resources/dev_ats.cfg')
runs {
client {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
mods {
test {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
mods {
test {
source sourceSets.main
}
}
}
}
}
repositories {
maven {
url "https://dvs1.progwml6.com/files/maven"
}
maven {
url "https://maven.cil.li"
}
maven {
name = "CurseForge"
url = "https://minecraft.curseforge.com/api/maven/"
metadataSources {
artifact()
}
}
maven {
url 'https://repo.maven.apache.org/maven2'
name 'Maven Central'
}
maven { url 'https://jitpack.io' }
maven {
url "https://cursemaven.com"
content {
includeGroup "curse.maven"
}
}
}
dependencies {
minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2855'
compileOnly fg.deobf("mezz.jei:jei_1.12.2:4.16.1.302:api")
runtimeOnly fg.deobf("mezz.jei:jei_1.12.2:4.16.1.302")
compileOnly fg.deobf("li.cil.oc:OpenComputers:MC1.12.2-1.7.2.67:api")
compileOnly("inventory-tweaks:InventoryTweaks:1.63:api")
compileOnly fg.deobf('com.github.jbredwards:Fluidlogged-API:5c18d3ff5c')
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.2'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.7.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.2'
compileOnly fg.deobf("curse.maven:overloaded-264601:2875265")
}
processResources {
inputs.property "version", project.version
inputs.property "mcversion", minecraft_version
setDuplicatesStrategy(DuplicatesStrategy.WARN)
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version': project.version, 'mcversion': minecraft_version
}
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
exclude 'dev_ats.cfg'
}
}
jar {
include "com/raoulvdberge/refinedstorage/**"
include "baubles/api/**"
include "assets/**"
include "mcmod.info"
include "pack.mcmeta"
}
jar.finalizedBy('reobfJar')
idea { module { inheritOutputDirs = true } }