forked from TeamMetallurgy/Aquaculture
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
108 lines (96 loc) · 2.72 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
plugins {
id 'maven-publish'
id 'net.minecraftforge.gradle' version '5.1+'
}
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
repositories {
maven {
name = "JEI maven"
url = "https://dvs1.progwml6.com/files/maven/"
}
maven {
name = "CraftTweaker2"
url = "https://maven.blamejared.com"
}
flatDir { dirs 'deps' }
}
version = "${minecraft_version}-${mod_version}" + getBuildNumber()
group = "com.teammetallurgy.aquaculture"
archivesBaseName = "Aquaculture"
minecraft {
mappings channel: 'official', version: project.minecraft_version
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
runs {
client {
workingDirectory project.file('run')
mods {
aquaculture {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
mods {
aquaculture {
source sourceSets.main
}
}
}
data {
workingDirectory project.file('run')
args '--mod', 'aquaculture', '--all', '--output', file("src/generated/resources/"), '--existing', file("src/main/resources/")
mods {
aquaculture {
source sourceSets.main
}
}
}
}
}
dependencies {
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
//compileOnly fg.deobf("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}")
//compileOnly fg.deobf("mezz.jei:jei-${minecraft_version}-forge-api:${jei_version}")
//runtimeOnly fg.deobf("mezz.jei:jei-${minecraft_version}-forge:${jei_version}")
//compileOnly fg.deobf("com.blamejared.crafttweaker:CraftTweaker-forge-1.18.1:${ct_version}")
}
jar {
manifest {
attributes([
"Implementation-Version": project.version
])
}
}
task apiJar(type: Jar) {
from sourceSets.main.allSource
from sourceSets.main.output
include 'com/teammetallurgy/aquaculture/api/**/*'
classifier = 'api'
}
publishing {
tasks.publish.dependsOn 'build'
publications {
mavenJava(MavenPublication) {
artifactId "aquaculture2_${minecraft_version}"
artifact jar
artifact apiJar
}
}
repositories {
if (project.hasProperty('maven_repo')) {
maven { url maven_repo }
} else {
mavenLocal()
}
}
}
artifacts {
archives apiJar
}
String getBuildNumber() {
return System.getenv('BUILD_NUMBER') ? ".jenkins" + System.getenv('BUILD_NUMBER') : "";
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}