Skip to content

Commit

Permalink
1.12 backport
Browse files Browse the repository at this point in the history
Signed-off-by: ErdbeerbaerLP <[email protected]>
  • Loading branch information
ErdbeerbaerLP committed Jun 14, 2021
1 parent 0bbb966 commit 60f9a65
Show file tree
Hide file tree
Showing 18 changed files with 365 additions and 897 deletions.
76 changes: 50 additions & 26 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ buildscript {
}
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '4.+', changing: true
classpath 'net.minecraftforge.gradle:ForgeGradle:3.+'
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
classpath "com.github.jengelman.gradle.plugins:shadow:4.0.4"
}
Expand Down Expand Up @@ -67,15 +67,17 @@ repositories {
name = 'sonatype-oss'
url = 'https://oss.sonatype.org/content/repositories/snapshots/'
}
maven{

maven { url "https://maven.latmod.com/" } //FTB
maven {
name = 'howaner'
url = "http://repo.howaner.de/"
}
}

//Forge
minecraft {
mappings channel: 'snapshot', version: '20210309-1.16.5'
mappings channel: 'snapshot', version: '20171003-1.12'
runs {
server {
workingDirectory project.file('run')
Expand All @@ -98,12 +100,15 @@ configurations {
embed
compile.extendsFrom(embed)
}
task release{
task release {

}
shadowJar {
classifier = '1.16'
classifier = '1.12'
configurations = [project.configurations.embed]
relocate 'org.slf4j', 'dcshadow.slf4j'
exclude('module-info.class', 'META-INF/versions/9/module-info.class')
// Keeping them causes errors when loaded by forge
}
reobf {
shadowJar {
Expand All @@ -119,16 +124,28 @@ artifacts {
dependencies {

// ========= Common =====================
embed 'de.erdbeerbaerlp:DiscordIntegration-Core:c68715a546'
embed('de.erdbeerbaerlp:DiscordIntegration-Core:c68715a546')

// ========= Minecraft Forge =============
minecraft 'net.minecraftforge:forge:1.16.5-36.1.16'
minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2855'

//Mixin
annotationProcessor 'org.spongepowered:mixin:0.8.2:processor'

//Dynmap-API
compileOnly('com.github.webbukkit:DynmapCoreAPI:2.5')

// FTB Utilities
compile "com.feed_the_beast.mods:FTBUtilities:5.+"
compile "com.feed_the_beast.mods:FTBLib:5.+"

//Votifier Forge
compile 'com.github.upcraftlp:votifier:master-SNAPSHOT'

//Mixin
embed("org.spongepowered:mixin:0.8-SNAPSHOT") {
transitive = false
}
}


Expand All @@ -139,21 +156,26 @@ mixin {

//Manifest attributes
jar {
classifier = "1.16"
classifier = "1.12"
manifest {
attributes([
'Maven-Artifact' : "${project.group}:${project.archivesBaseName}:${project.version}",
'Timestamp' : System.currentTimeMillis(),
"Specification-Title" : "dcintegration",
"Specification-Vendor" : "dcintegration",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : "${version}",
"Implementation-Vendor" : "dcintegration",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
'MixinConnector' : 'de.erdbeerbaerlp.dcintegration.forge.DCMixinConnector'
'Maven-Artifact' : "${project.group}:${project.archivesBaseName}:${project.version}",
'Timestamp' : System.currentTimeMillis(),
"Specification-Title" : "dcintegration",
"Specification-Vendor" : "dcintegration",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : "${version}",
"Implementation-Vendor" : "dcintegration",
"Implementation-Timestamp" : new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
'MixinConnector' : 'de.erdbeerbaerlp.dcintegration.forge.DCMixinConnector',
'TweakClass' : 'org.spongepowered.asm.launch.MixinTweaker',
'MixinConfigs' : 'mixins.dcintegration.json',
"ForceLoadAsMod" : "true",
'FMLCorePluginContainsFMLMod': 'true'
])
}

}

//Curseforge publishing
Expand All @@ -164,30 +186,32 @@ curseforge {
id = '324952'
changelog = project.changelog
releaseType = 'beta'
addGameVersion '1.16.5'
addGameVersion '1.12.2'
mainArtifact(jar) {
displayName = "DiscordIntegration-Forge $version (MC 1.16.5)"
displayName = "DiscordIntegration-Forge $version (MC 1.12.2)"
}
relations {
optionalDependency 'voting'
requiredDependency 'mixinbootstrap'
}
//relations {
//}
}
}
}
import com.modrinth.minotaur.TaskModrinthUpload

task publishModrinth (type: TaskModrinthUpload){
task publishModrinth(type: TaskModrinthUpload) {

if (project.hasProperty('modrinth.apikey')) { // $GRADLE_USER_HOME/gradle.properties
token = getProperty("modrinth.apikey") // Use an environment property!
projectId = 'rbJ7eS5V'
versionNumber = version
versionName = "DiscordIntegration-Forge $version (MC 1.16.5)"
versionName = "DiscordIntegration-Forge $version (MC 1.12.2)"
uploadFile = shadowJar
changelog = project.changelog
addGameVersion('1.16.5')
addGameVersion('1.12.2')
addLoader('forge')
versionType = "BETA"
}
}

tasks.release.dependsOn(tasks.build, tasks.curseforge,tasks.publishModrinth)
tasks.release.dependsOn(tasks.build, tasks.curseforge, tasks.publishModrinth)
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
changelog=Fixed even more bugs
changelog=Final 1.12 backport, expect and report bugs, broken features and crashes!\nSupport for this 1.12 branch ends on 31.9.2021\n\n!!! Mod uses new config file !!!\nOld config won't be deleted\n\nInstall MixinBootstrap for full feature access
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
Loading

0 comments on commit 60f9a65

Please sign in to comment.