Skip to content

Commit

Permalink
Roll back to 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
kappa-maintainer committed Nov 27, 2023
1 parent deb36f8 commit 98748ab
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 44 deletions.
124 changes: 85 additions & 39 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
buildscript {
repositories {
maven { url = 'https://maven.minecraftforge.net' }
mavenCentral()
maven {
name = "forge"
url = "https://maven.minecraftforge.net"
}
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '6.0.+', changing: true
classpath("com.anatawa12.forge:ForgeGradle:2.3-1.0.+") {
changing = true
}
}
}

apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'maven'

group = "codechicken" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "CodeChickenLib"
Expand All @@ -26,48 +32,23 @@ configFile.withReader {
project.ext.config = new ConfigSlurper().parse prop
}

version = "${project.config.mod_version}." + (System.getenv("BUILD_NUMBER") ?: "400")
version = "${project.config.mod_version}." + (System.getenv("BUILD_NUMBER") ?: "1")

sourceSets.main.resources { srcDir 'src/generated/resources' }
println config.mc_version + "-" + config.forge_version
// Setup the forge minecraft plugin data. Specify the preferred forge/minecraft version here
minecraft {

mappings channel: 'snapshot', version: '20171003-1.12'

accessTransformer = file('src/main/resources/ccl_at.cfg')

runs {
client {
workingDirectory project.file('run/client')

property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'

}

server {
workingDirectory project.file('run/server')

property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'

mods {
"${mod_id}" {
source sourceSets.main
}
}
}
}
version = config.mc_version + "-" + config.forge_version
mappings = config.mappings
runDir = "run"
replace '${mod_version}', project.config.mod_version
makeObfSourceJar = false
}

dependencies {
testImplementation 'junit:junit:4.12'
minecraft "net.minecraftforge:forge:1.12.2-14.23.5.2860"
testCompile 'junit:junit:4.12'
}

processResources {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
inputs.property "version", project.version
inputs.property "mc_version", project.config.mc_version

Expand All @@ -78,31 +59,96 @@ processResources {
rename '(.+_at.cfg)', 'META-INF/$1'
}

version = "1.12.2-${project.version}"
version = "${project.minecraft.version}-${project.version}"
def commonManifest = {
attributes 'FMLAT': 'ccl_at.cfg'
}

jar {
archiveClassifier = 'universal'
classifier = 'universal'
manifest commonManifest
}

task deobfJar(type: Jar) {
from sourceSets.main.output
archiveClassifier = 'deobf'
classifier = 'deobf'
manifest commonManifest
}

task srcJar(type: Jar) {
from sourceSets.main.allSource
archiveClassifier = 'sources'
classifier = 'sources'
manifest commonManifest
}

task signJar(type: SignJar, dependsOn: reobfJar) {
onlyIf { // Skip the task if our secret data isn't available
project.hasProperty('keyStore')
}

if (project.hasProperty('keyStore')) {
keyStore = project.keyStore // This needs to be a path to the keystore file
alias = project.keyStoreAlias
storePass = project.keyStorePass
keyPass = project.keyStoreKeyPass
inputFile = jar.archivePath
outputFile = jar.archivePath
}
}

build.dependsOn signJar

// Tell the artifact system about our extra jars
artifacts {
archives deobfJar
archives srcJar
}

// Configure an upload task.
uploadArchives {
repositories {
mavenDeployer {
if (project.hasProperty("local_maven")) {
repository(url: "file://${local_maven}")
pom {
groupId = project.group
// Force the maven upload to use the <mcversion>-<version> syntax preferred at files
artifactId = project.archivesBaseName
project {
name project.archivesBaseName
packaging 'jar'
description 'CodeChickenLib'
url 'https://github.com/TheCBProject/CodeChickenLib'

scm {
url 'https://github.com/TheCBProject/CodeChickenLib'
connection 'scm:git:git://github.com/TheCBProject/CodeChickenLib.git'
developerConnection 'scm:git:git@github.com:TheCBProject/CodeChickenLib.git'
}

issueManagement {
system 'github'
url 'https://github.com/TheCBProject/CodeChickenLib/issues'
}

licenses {
license {
name 'GNU Lesser Public License (GPL), Version 2.1'
url 'https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt'
distribution 'repo'
}
}

developers {
developer {
id 'chicken-bones'
name 'chicken-bones'
roles { role 'developer' }
}
}
}
}
}
}
}
}
4 changes: 2 additions & 2 deletions build.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mc_version=1.12.2
forge_version=14.23.5.2860
forge_version=14.23.5.2847
mappings=snapshot_20171003
mod_version=3.2.3
mod_version=3.2.4
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-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
4 changes: 2 additions & 2 deletions src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"modid": "codechickenlib",
"name": "CodeChicken Lib",
"description": "CodeChickenLib is a library of systems to help make various aspects of minecraft modding easier. It contains libraries for 3D math and transformations, model rendering, packets, config, colours, asm and a few other things..",
"version": "3.2.3",
"mcversion": "1.12.2",
"version": "${version}",
"mcversion": "${mc_version}",
"url": "http://chickenbones.net/Pages/links.html",
"authorList": [
"ChickenBones",
Expand Down

0 comments on commit 98748ab

Please sign in to comment.