-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
146 lines (141 loc) · 4.94 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
buildscript {
repositories {
mavenCentral()
maven { url = "https://files.minecraftforge.net/maven" }
maven {
name = 'sponge'
url = 'https://repo.spongepowered.org/maven'
}
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
maven { url = 'https://sizableshrimp.me/maven' }
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath 'org.spongepowered:mixingradle:0.7.32'
}
}
plugins {
id "com.matthewprenger.cursegradle" version "1.4.0"
id 'eclipse'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '7.1.2'
}
apply plugin: 'net.minecraftforge.gradle'
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'org.spongepowered.mixin'
repositories {
maven {
name = 'sponge'
url = 'https://repo.spongepowered.org/maven'
}
}
version = "2.0.4"
group = "de.erdbeerbaerlp.guilib" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "eguilib"
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
minecraft {
// The mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD Snapshot are built nightly.
// stable_# Stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not always work.
// Simply re-run your setup task after changing the mappings to update your workspace.
mappings channel: 'official', version: '1.19.3'
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
}
configurations {
embed
compileOnly.extendsFrom(embed)
}
shadowJar {
archiveClassifier = ""
configurations = [project.configurations.embed]
relocate 'com.icafe4j', 'guilibshadow.cafe4j'
relocate 'org.imgscalr', 'guilibshadow.org.imgscalr'
relocate 'jj2000', 'guilibshadow.jj2000'
relocate 'org.slf4j', 'guilibshadow.org.slf4j'
}
repositories {
maven { url 'https://jitpack.io' }
maven{ url "https://maven.geotoolkit.org"} //Java Advanced Imaging for ImageIO
}
dependencies {
minecraft 'net.minecraftforge:forge:1.19.3-44.0.37'
annotationProcessor "org.spongepowered:mixin:0.8.5:processor"
embed 'com.github.dragon66:icafe:26c49d5d40'
embed 'com.github.rkalla:imgscalr:4.2-release'
embed 'org.mp4parser:isoparser:1.9.41'
}
mixin {
add sourceSets.main, 'mixins.eguilib.refmap.json'
config 'mixins.eguilib.json'
}
reobf {
shadowJar {
dependsOn tasks.createMcpToSrg
mappings = tasks.createMcpToSrg.outputs.files.singleFile
}
}
artifacts {
archives tasks.shadowJar
}
jar {
manifest {
attributes([
'Maven-Artifact' : "${project.group}:${project.archivesBaseName}:${project.version}",
'Timestamp' : System.currentTimeMillis(),
"Specification-Title" : "eguilib",
"Specification-Vendor" : "eguilib",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : "${version}",
"Implementation-Vendor" : "eguilib",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
curseforge {
// $GRADLE_USER_HOME/gradle.properties
if (project.hasProperty('curseforge.apikey')) {
apiKey = getProperty("curseforge.apikey")
project {
id = '332522'
changelog = project.changelog
releaseType = 'beta'
addGameVersion '1.19.3'
mainArtifact(jar) {
displayName = "Erdbeerbaer's GUI Library-$version (MC 1.19.3)"
}
}
}
}
tasks.curseforge.dependsOn(build)
publishing {
publications {
maven(MavenPublication) {
groupId = 'de.erdbeerbaerlp'
artifactId = 'guilib'
from components.java
}
}
repositories {
maven {
credentials {// $GRADLE_USER_HOME/gradle.properties
username = project.nexusUser
password = project.nexusPass
}
if(project.version.endsWith('-SNAPSHOT')) {
url = "https://repo.erdbeerbaerlp.de/repository/maven-snapshots"
}else{
url = "https://repo.erdbeerbaerlp.de/repository/maven-releases"
}
}
}
}
task release{
}
tasks.release.dependsOn(tasks.build, tasks.curseforge,tasks.publish)