Rename project and export a dev jar
This commit is contained in:
parent
76904b2857
commit
3554feeccb
4 changed files with 53 additions and 21 deletions
5
.gitattributes
vendored
Normal file
5
.gitattributes
vendored
Normal 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
41
.gitignore
vendored
|
@ -1,23 +1,28 @@
|
|||
# Compiled class file
|
||||
*.class
|
||||
# eclipse
|
||||
bin
|
||||
*.launch
|
||||
.settings
|
||||
.metadata
|
||||
.classpath
|
||||
.project
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
# idea
|
||||
out
|
||||
*.ipr
|
||||
*.iws
|
||||
*.iml
|
||||
.idea
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
# gradle
|
||||
build
|
||||
.gradle
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
# other
|
||||
eclipse
|
||||
run
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.nar
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
# Files from Forge MDK
|
||||
forge*changelog.txt
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
.vscode
|
||||
mcmodsrepo
|
24
build.gradle
24
build.gradle
|
@ -5,7 +5,7 @@ plugins {
|
|||
}
|
||||
|
||||
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'
|
||||
|
||||
// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
|
||||
|
@ -148,7 +148,7 @@ dependencies {
|
|||
jar {
|
||||
manifest {
|
||||
attributes([
|
||||
"Specification-Title" : "libzontreck",
|
||||
"Specification-Title" : project.name,
|
||||
"Specification-Vendor" : "zontreck",
|
||||
"Specification-Version" : "1", // We are version 1 of ourselves
|
||||
"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
|
||||
// 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 {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
artifact jar
|
||||
artifact devJar
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
|
|
|
@ -3,4 +3,6 @@ pluginManagement {
|
|||
gradlePluginPortal()
|
||||
maven { url = 'https://maven.minecraftforge.net/' }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "libzontreck"
|
Reference in a new issue