1+ buildscript {
2+ repositories {
3+ maven {
4+ name = ' sponge'
5+ url = ' https://repo.spongepowered.org/maven'
6+ }
7+ maven { url = ' https://files.minecraftforge.net/maven' }
8+ jcenter()
9+ mavenCentral()
10+ }
11+ dependencies {
12+ classpath group : ' net.minecraftforge.gradle' , name : ' ForgeGradle' , version : ' 3.+' , changing : true
13+ classpath group : ' org.spongepowered' , name : ' mixingradle' , version : ' 0.7-SNAPSHOT'
14+ }
15+ }
16+
17+ apply plugin : ' net.minecraftforge.gradle'
18+ apply plugin : ' org.spongepowered.mixin'
19+
20+ group = ' me.hypherionmc'
21+ version = ' 1.0'
22+ archivesBaseName = ' SimpleSplashScreen'
23+
24+ // Jenkins
25+ if (System . getenv(' BUILD_NUMBER' ) != null ) {
26+ version = " dev-" + System . getenv(' BUILD_NUMBER' )
27+ jar. archiveName = archivesBaseName + " -dev-" + System . getenv(' BUILD_NUMBER' ) + " .jar"
28+ }
29+
30+ sourceCompatibility = targetCompatibility = compileJava. sourceCompatibility = compileJava. targetCompatibility = ' 1.8'
31+
32+ minecraft {
33+ // The mappings can be changed at any time, and must be in the following format.
34+ // snapshot_YYYYMMDD Snapshot are built nightly.
35+ // stable_# Stables are built at the discretion of the MCP team.
36+ // Use non-default mappings at your own risk. they may not always work.
37+ // Simply re-run your setup task after changing the mappings to update your workspace.
38+ mappings channel : ' snapshot' , version : ' 20210309-1.16.5'
39+ // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
40+
41+ // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
42+
43+ // Default run configurations.
44+ // These can be tweaked, removed, or duplicated as needed.
45+ runs {
46+ client {
47+ workingDirectory project. file(' run' )
48+ arg " -mixin.config=simplesplashscreen.mixins.json"
49+ // Recommended logging data for a userdev environment
50+ property ' forge.logging.markers' , ' SCAN,REGISTRIES,REGISTRYDUMP'
51+
52+ // Recommended logging level for the console
53+ property ' forge.logging.console.level' , ' debug'
54+
55+ mods {
56+ simplesplashscreen {
57+ source sourceSets. main
58+ }
59+ }
60+ }
61+
62+ server {
63+ workingDirectory project. file(' run' )
64+
65+ // Recommended logging data for a userdev environment
66+ property ' forge.logging.markers' , ' SCAN,REGISTRIES,REGISTRYDUMP'
67+
68+ // Recommended logging level for the console
69+ property ' forge.logging.console.level' , ' debug'
70+
71+ mods {
72+ simplesplashscreen {
73+ source sourceSets. main
74+ }
75+ }
76+ }
77+
78+ data {
79+ workingDirectory project. file(' run' )
80+
81+ // Recommended logging data for a userdev environment
82+ property ' forge.logging.markers' , ' SCAN,REGISTRIES,REGISTRYDUMP'
83+
84+ // Recommended logging level for the console
85+ property ' forge.logging.console.level' , ' debug'
86+
87+ // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
88+ args ' --mod' , ' simplesplashscreen' , ' --all' , ' --output' , file(' src/generated/resources/' ), ' --existing' , file(' src/main/resources/' )
89+
90+ mods {
91+ simplesplashscreen {
92+ source sourceSets. main
93+ }
94+ }
95+ }
96+ }
97+ }
98+
99+ // Include resources generated by data generators.
100+ sourceSets. main. resources { srcDir ' src/generated/resources' }
101+
102+ repositories {
103+ maven { url " https://maven.shedaniel.me/" }
104+ }
105+
106+ dependencies {
107+ // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
108+ // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
109+ // The userdev artifact is a special name and will get all sorts of transformations applied to it.
110+ minecraft ' net.minecraftforge:forge:1.16.5-36.1.10'
111+
112+ compile(fg. deobf(" me.shedaniel.cloth:cloth-config-forge:4.11.26" ))
113+
114+ // You may put jars on which you depend on in ./libs or you may define them like so..
115+ // compile "some.group:artifact:version:classifier"
116+ // compile "some.group:artifact:version"
117+
118+ // Real examples
119+ // compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
120+ // compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
121+
122+ // The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
123+ // provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
124+
125+ // These dependencies get remapped to your current MCP mappings
126+ // deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev'
127+
128+ // For more info...
129+ // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
130+ // http://www.gradle.org/docs/current/userguide/dependency_management.html
131+ }
132+
133+ // Example for how to get properties into the manifest for reading by the runtime..
134+ jar {
135+ manifest {
136+ attributes([
137+ " Specification-Title" : " simplesplashscreen" ,
138+ // "Specification-Vendor": "customsplashscreen authors",
139+ " Specification-Version" : " 1" , // We are version 1 of ourselves
140+ " Implementation-Title" : project. name,
141+ " Implementation-Version" : project. version,
142+ // "Implementation-Vendor": "customsplashscreen authors",
143+ " Implementation-Timestamp" : new Date (). format(" yyyy-MM-dd'T'HH:mm:ssZ" ),
144+ " MixinConfigs" : " simplesplashscreen.mixins.json"
145+ ])
146+ }
147+ }
148+
149+ jar. finalizedBy(' reobfJar' )
150+
151+ mixin {
152+ add sourceSets. main, " simplesplashscreen.refmap.json"
153+ }
0 commit comments