forked from alcatrazEscapee/primal-winter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
109 lines (96 loc) · 3.4 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
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
maven { url='https://dist.creeper.host/Sponge/maven' }
jcenter()
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
}
}
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
plugins {
id 'com.matthewprenger.cursegradle' version '1.4.0'
id 'idea'
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.spongepowered.mixin'
/**
* Version in dev is set to 'dev'
* Any builds produced by the github actions build script will have a version matching their tag.
* All version numbers should be Semantic Versioning 2.0 compliant
*/
if (System.getenv('VERSION') != null) {
version = System.getenv('VERSION')
} else {
version = 'dev'
}
group = "com.alcatrazescapee.${mod_id}" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "${mod_id}-forge-${mc_version}"
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
repositories {
mavenLocal()
}
minecraft {
// Mappings used are generated by Mappificator (https://github.com/alcatrazEscapee/mappificator)
// See the project README page for how to generate the mapping set.
// Otherwise, we use official mappings in a build script version
def officialVersion = System.getenv("OFFICIAL_MAPPINGS")
if (officialVersion == null) {
mappings channel: 'snapshot', version: 'complete-20200912-1.16.3-v5'
} else {
mappings channel: 'official', version: mc_version
}
//accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
// Run configurations
runs {
client {
workingDirectory project.file('run')
arg '-mixin.config=' + mod_id + '.mixins.json'
property 'forge.logging.console.level', 'debug'
mods {
primalwinter {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
arg '-mixin.config=' + mod_id + '.mixins.json'
property 'forge.logging.console.level', 'debug'
mods {
primalwinter {
source sourceSets.main
}
}
}
}
}
dependencies {
minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}"
}
// Puts the mod version into the jar for mods.toml to read from
jar {
manifest {
attributes ([
"Implementation-Version": "${version}",
"MixinConfigs": "${mod_id}.mixins.json"
])
}
}
mixin {
add sourceSets.main, "${mod_id}.refmap.json"
}
curseforge {
project {
def envApiKey = System.getenv('CURSEFORGE_API_KEY')
apiKey = envApiKey == null ? 'nope' : envApiKey
id = '393321' // Primal Winter
changelog = "[Release Notes ${version}](https://github.com/alcatrazEscapee/primal-winter/releases/tag/v${version}-forge)"
changelogType = 'markdown'
releaseType = 'release' // Forge versions are marked release
addGameVersion "${mc_version}"
}
}