1.20.1 Port!
This commit is contained in:
parent
8c059a5d2b
commit
b69eda4f90
13 changed files with 143 additions and 188 deletions
134
build.gradle
134
build.gradle
|
|
@ -1,130 +1,78 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
maven { url = 'https://files.minecraftforge.net/maven' }
|
||||
maven { url "https://plugins.gradle.org/m2/" }
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
|
||||
}
|
||||
dependencies {
|
||||
classpath "gradle.plugin.com.matthewprenger:CurseGradle:1.4.0"
|
||||
}
|
||||
plugins {
|
||||
id "com.modrinth.minotaur" version "2.+"
|
||||
id "com.matthewprenger.cursegradle" version "1.4.0+"
|
||||
id "net.neoforged.gradle" version "[6.0.18,6.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: 'eclipse'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'com.matthewprenger.cursegradle'
|
||||
|
||||
|
||||
group = 'com.oitsjustjose.charged_explosives' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "ChargedExplosives-${game_version}-${mod_version}"
|
||||
group = 'com.oitsjustjose.charged_explosives'
|
||||
version = "${mod_version}"
|
||||
base { archivesName = "ChargedExplosives-${game_version}-${mod_version}" }
|
||||
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
|
||||
minecraft {
|
||||
mappings channel: 'official', version: "${game_version}"
|
||||
copyIdeResources = true
|
||||
runs {
|
||||
client {
|
||||
workingDirectory project.file('run')
|
||||
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
|
||||
mods {
|
||||
charged_explosives {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
mods { charged_explosives { source sourceSets.main } }
|
||||
}
|
||||
|
||||
server {
|
||||
workingDirectory project.file('run')
|
||||
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
|
||||
mods {
|
||||
charged_explosives {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
mods { charged_explosives { source sourceSets.main } }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { url = "https://dvs1.progwml6.com/files/maven" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft "net.minecraftforge:forge:${game_version}-${forge_version}"
|
||||
minecraft "net.neoforged:forge:${game_version}-${neo_version}"
|
||||
}
|
||||
|
||||
// Example for how to get properties into the manifest for reading by the runtime..
|
||||
jar {
|
||||
manifest {
|
||||
attributes([
|
||||
"Specification-Title": "charged_explosives",
|
||||
"Specification-Vendor": "oitsjustjose.com",
|
||||
"Specification-Version": "1", // We are version 1 of ourselves
|
||||
"Implementation-Title": project.name,
|
||||
"Implementation-Version": "${mod_version}",
|
||||
"Implementation-Vendor" :"oitsjustjose.com",
|
||||
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
|
||||
"Specification-Title" : "charged_explosives",
|
||||
"Specification-Vendor" : "oitsjustjose.com",
|
||||
"Specification-Version" : "1", // We are version 1 of ourselves
|
||||
"Implementation-Title" : project.name,
|
||||
"Implementation-Version" : "${mod_version}",
|
||||
"Implementation-Vendor" : "oitsjustjose.com",
|
||||
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Example configuration to allow publishing using the maven-publish task
|
||||
// we define a custom artifact that is sourced from the reobfJar output task
|
||||
// and then declare that to be published
|
||||
// Note you'll need to add a repository here
|
||||
def reobfFile = file("$buildDir/reobfJar/output.jar")
|
||||
def reobfArtifact = artifacts.add('default', reobfFile) {
|
||||
type 'jar'
|
||||
builtBy 'reobfJar'
|
||||
}
|
||||
|
||||
task deobfJar(type: Jar) {
|
||||
from sourceSets.main.output
|
||||
classifier = 'Deobf'
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
classifier = 'Sources'
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives deobfJar
|
||||
archives sourcesJar
|
||||
tasks.register('publish') {
|
||||
dependsOn 'curseforge'
|
||||
dependsOn 'modrinth'
|
||||
}
|
||||
|
||||
curseforge {
|
||||
apiKey = project.hasProperty("CURSEFORGE_API_KEY") ? project.CURSEFORGE_API_KEY : ""
|
||||
project {
|
||||
id = '693885'
|
||||
changelogType = 'markdown'
|
||||
changelog = file("./changelog.md")
|
||||
releaseType = 'release'
|
||||
addGameVersion "1.19"
|
||||
addGameVersion "1.19.1"
|
||||
mainArtifact(jar) {
|
||||
displayName = "Charged Explosives ${game_version} ${mod_version}"
|
||||
apiKey = project.hasProperty("CURSEFORGE_API_KEY") ? project.CURSEFORGE_API_KEY : ""
|
||||
project {
|
||||
id = '693885'
|
||||
changelogType = 'markdown'
|
||||
changelog = file("./changelog.md")
|
||||
releaseType = 'release'
|
||||
addGameVersion "${game_version}"
|
||||
mainArtifact(jar) {
|
||||
displayName = "Charged Explosives ${game_version} ${mod_version}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
artifact reobfArtifact
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
url "file:///${project.projectDir}/mcmodsrepo"
|
||||
}
|
||||
}
|
||||
modrinth {
|
||||
token = project.hasProperty("MODRINTH_API_KEY") ? project.MODRINTH_API_KEY : ""
|
||||
projectId = "sv2l2OG2"
|
||||
versionName = "Charged Explosives ${game_version} ${mod_version}"
|
||||
versionNumber = "${game_version}-${mod_version}"
|
||||
versionType = "release"
|
||||
uploadFile = jar
|
||||
gameVersions = ["${game_version}"]
|
||||
loaders = ["forge"]
|
||||
changelog = file("./changelog.md").text
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue