Rename project and export a dev jar

This commit is contained in:
Zontreck 2022-10-12 22:09:21 -07:00
parent 76904b2857
commit 3554feeccb
4 changed files with 53 additions and 21 deletions

5
.gitattributes vendored Normal file
View file

@ -0,0 +1,5 @@
# Disable autocrlf on generated files, they always generate with LF
# Add any extra files or paths here to make git stop saying they
# are changed when only line endings change.
src/generated/**/.cache/cache text eol=lf
src/generated/**/*.json text eol=lf

41
.gitignore vendored
View file

@ -1,23 +1,28 @@
# Compiled class file # eclipse
*.class bin
*.launch
.settings
.metadata
.classpath
.project
# Log file # idea
*.log out
*.ipr
*.iws
*.iml
.idea
# BlueJ files # gradle
*.ctxt build
.gradle
# Mobile Tools for Java (J2ME) # other
.mtj.tmp/ eclipse
run
# Package Files # # Files from Forge MDK
*.jar forge*changelog.txt
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml .vscode
hs_err_pid* mcmodsrepo

View file

@ -5,7 +5,7 @@ plugins {
} }
version = "${myversion}" version = "${myversion}"
group = 'dev.zontreck.libzontreck' // http://maven.apache.org/guides/mini/guide-naming-conventions.html group = 'dev.zontreck' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'libzontreck' archivesBaseName = 'libzontreck'
// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17. // Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
@ -148,7 +148,7 @@ dependencies {
jar { jar {
manifest { manifest {
attributes([ attributes([
"Specification-Title" : "libzontreck", "Specification-Title" : project.name,
"Specification-Vendor" : "zontreck", "Specification-Vendor" : "zontreck",
"Specification-Version" : "1", // We are version 1 of ourselves "Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name, "Implementation-Title" : project.name,
@ -165,10 +165,30 @@ jar.finalizedBy('reobfJar')
// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing // However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
// publish.dependsOn('reobfJar') // publish.dependsOn('reobfJar')
task devJar(type: Jar) {
from sourceSets.main.allJava
classifier = 'dev'
manifest {
attributes([
"Specification-Title": project.name,
"Specification-Vendor": "zontreck",
"Specification-Version": "1",
"Implementation-Title": project.name,
"Implementation-Version": project.jar.archiveVersion,
"Implementation-Vendor": "zontreck",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
devJar.finalizedBy('reobfJar')
publishing { publishing {
publications { publications {
mavenJava(MavenPublication) { mavenJava(MavenPublication) {
artifact jar artifact jar
artifact devJar
} }
} }
repositories { repositories {

View file

@ -4,3 +4,5 @@ pluginManagement {
maven { url = 'https://maven.minecraftforge.net/' } maven { url = 'https://maven.minecraftforge.net/' }
} }
} }
rootProject.name = "libzontreck"