forked from MoeBoy76/NBTEdit
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
1,719 additions
and
1,363 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,99 @@ | ||
buildscript { | ||
repositories { | ||
jcenter() | ||
maven { url = "http://files.minecraftforge.net/maven" } | ||
// These repositories are only for Gradle plugins, put any other repositories in the repository block further below | ||
maven { url = 'https://maven.minecraftforge.net' } | ||
mavenCentral() | ||
} | ||
dependencies { | ||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' | ||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true | ||
} | ||
} | ||
apply plugin: 'net.minecraftforge.gradle.forge' | ||
apply plugin: 'net.minecraftforge.gradle' | ||
|
||
version = "1.12-2.0.2" | ||
group = "com.mcf.davidee.nbtedit" | ||
archivesBaseName = "NBTEdit" | ||
group = 'com.mcf.davidee.nbtedit' | ||
version = '1.16.5-2.0.0' | ||
|
||
sourceCompatibility = targetCompatibility = 1.7 | ||
|
||
idea { module { inheritOutputDirs = true } } | ||
java { | ||
withSourcesJar() | ||
archivesBaseName = 'NBTEdit' | ||
toolchain.languageVersion = JavaLanguageVersion.of(8) | ||
} | ||
|
||
minecraft { | ||
version = "1.12-14.21.0.2341" | ||
runDir = "run" | ||
mappings = "snapshot_20170617" | ||
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. | ||
mappings channel: 'official', version: '1.16.5' | ||
|
||
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') | ||
|
||
runs { | ||
client { | ||
workingDirectory project.file('run_client') | ||
mods { | ||
nbtedit { | ||
source sourceSets.main | ||
} | ||
} | ||
} | ||
|
||
server { | ||
workingDirectory project.file('run_server') | ||
mods { | ||
nbtedit { | ||
source sourceSets.main | ||
} | ||
} | ||
} | ||
|
||
data { | ||
workingDirectory project.file('run_data') | ||
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources. | ||
args '--mod', 'nbtedit', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') | ||
|
||
mods { | ||
nbtedit { | ||
source sourceSets.main | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
task deobfJar(type: Jar) { | ||
from sourceSets.main.output | ||
appendix = 'deobf' | ||
// Include resources generated by data generators. | ||
sourceSets.main.resources { srcDir 'src/generated/resources' } | ||
|
||
repositories { | ||
} | ||
|
||
tasks.build.dependsOn('sourceJar', 'deobfJar') | ||
dependencies { | ||
minecraft 'net.minecraftforge:forge:1.16.5-36.2.35' | ||
} | ||
|
||
processResources { | ||
from (sourceSets.main.resources.srcDirs) { | ||
include '**/*.info' | ||
expand 'version':project.version, 'mcversion':project.minecraft.version | ||
// Example for how to get properties into the manifest for reading at runtime. | ||
jar { | ||
manifest { | ||
attributes([ | ||
'Specification-Title' : 'nbtedit', | ||
'Specification-Vendor' : 'Jay113355', | ||
'Specification-Version' : '1', // We are version 1 of ourselves | ||
'Implementation-Title' : project.name, | ||
'Implementation-Version' : project.jar.archiveVersion, | ||
'Implementation-Vendor' : 'Jay113355', | ||
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") | ||
]) | ||
} | ||
from(sourceSets.main.resources.srcDirs) { exclude '**/*.info' } | ||
} | ||
|
||
allprojects { | ||
gradle.projectsEvaluated { | ||
tasks.withType(JavaCompile) { | ||
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" | ||
} | ||
} | ||
} | ||
task deobfJar(type: Jar) { // Generate deobfuscated | ||
from sourceSets.main.output | ||
classifier = 'deobf' | ||
} | ||
|
||
artifacts { | ||
sourcesJar | ||
deobfJar | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation | ||
} | ||
|
||
jar.finalizedBy('reobfJar', 'deobfJar') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.