Skip to content

Commit

Permalink
chore(buildscripts): update and bump
Browse files Browse the repository at this point in the history
  • Loading branch information
ROMVoid95 committed Oct 27, 2022
1 parent aafb53c commit b1500a4
Show file tree
Hide file tree
Showing 8 changed files with 93 additions and 283 deletions.
37 changes: 37 additions & 0 deletions .pomrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "Galacticraft-Legacy",
"url": "https://github.com/TeamGalacticraft/Galacticraft-Legacy",
"description": "An advanced space exploration mod for Minecraft",
"inceptionYear": "2021",
"organization": {
"name": "TeamGalacticraft",
"url": "https://github.com/TeamGalacticraft"
},
"licenses": [
{
"name": "MIT",
"url": "https://github.com/TeamGalacticraft/Galacticraft-Legacy/blob/master/LICENSE",
"distribution": "repo"
}
],
"issueManagement": {
"system": "github",
"url": "https://github.com/TeamGalacticraft/Galacticraft-Legacy/issues"
},
"scm": {
"connection": "scm:git:git://github.com/TeamGalacticraft/Galacticraft-Legacy.git",
"developerConnection": "scm:git:[email protected]:TeamGalacticraft/Galacticraft-Legacy.git",
"url": "https://github.com/TeamGalacticraft/Galacticraft-Legacy"
},
"developers": [
{
"id": "rom",
"name": "ROMVoid95",
"email": "[email protected]",
"roles": [
"developer"
],
"timezone": "CST/CDT"
}
]
}
177 changes: 17 additions & 160 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,194 +1,51 @@
buildscript {
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
}
}

plugins {
id 'java'
id 'eclipse'
id 'io.freefair.lombok' version '6.5.0.2'
id 'wtf.gofancy.fancygradle' version '1.+'
id 'org.cadixdev.licenser' version '0.6.1'
id 'net.galacticraft.internal.maven' version '1.0.0'
id 'net.galacticraft.internal.legacy.defaults' version '1.0.0'
}

apply plugin: 'net.minecraftforge.gradle'
java.toolchain.languageVersion = JavaLanguageVersion.of(8)

group = "micdoodle8.mods.galacticraft"
archivesBaseName = "Galacticraft"

version = '4.0.4-SNAPSHOT'
version = "${mod_version}${version_suffix}"

repositories {
mavenCentral()
maven {
name 'galacticraft'
url 'https://maven.galacticraft.net/repository/legacy-common/'
}
maven {
name 'buildcraft'
url 'https://mod-buildcraft.com/maven/'
content { includeGroup 'com.mod-buildcraft' }
}
maven {
name 'ic2'
url 'https://maven.ic2.player.to'
content { includeGroup 'net.industrial-craft' }
}
maven {
name 'prog'
url 'https://dvs1.progwml6.com/files/maven'
content { includeGroup 'mezz.jei' }
}
maven {
name 'opencomputers'
url 'https://maven.cil.li/'
content { includeGroup 'li.cil.oc' }
}
maven {
name 'BlameJared - Crafttweaker'
url 'https://maven.blamejared.com/'
content { includeGroup 'CraftTweaker2' }
}
maven {
name 'cc-tweaked'
url 'https://squiddev.cc/maven/'
content { includeGroup 'org.squiddev' }
}

all {
ArtifactRepository repo ->
if (repo instanceof MavenArtifactRepository) {
if ((repo.url.toString() == 'files.minecraftforge.net') ||
(repo.url.toString() == 'maven.minecraftforge.net')) {
remove repo
}
}
url 'https://maven.galacticraft.net/repository/legacy-common/'
}
}

configurations {
compileOnly.extendsFrom compileMod
compileOnly.extendsFrom compileRequire
}

dependencies {
minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}"

compileMod fg.deobf('mod.dependency:biomes-o-plenty:7.0.1.2445')
compileMod fg.deobf('mod.dependency:mekanism:9.8.3.390')
compileMod fg.deobf('mod.dependency:appliedenergistics2:rv6-stable-7')
compileMod fg.deobf('mod.dependency:redstoneflux:2.1.1.1')
compileMod fg.deobf('mod.dependency:actuallyadditions:r152')
compileMod fg.deobf('mod.dependency:playerapi:1.1')
compileMod fg.deobf('mod.dependency:industrialcraft-2:2.8.222-ex112')
compileMod fg.deobf('mod.dependency:journeymap:5.7.1')
compileMod fg.deobf('mod.dependency:buildcraft-api:7.99.24.8')
compileMod fg.deobf('mod.dependency:jei:4.16.1.302:api')
runtimeOnly fg.deobf('mod.dependency:jei:4.16.1.302')
}

minecraft {
mappings channel: "${mapping_channel}", version: "${mapping_version}"

accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')

runs {
client {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
if (project.hasProperty('uuid'))
args '--uuid', project.getProperty('uuid')
if (project.hasProperty('username'))
args '--username', project.getProperty('username')
jvmArg '-Dfml.coreMods.load=micdoodle8.mods.miccore.MicdoodlePlugin'
}
server {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
jvmArg '-Dfml.coreMods.load=micdoodle8.mods.miccore.MicdoodlePlugin'
}
}
}

fancyGradle {
patches {
resources
coremods
asm
}
}

def setManifest = { Manifest manifest->
manifest.attributes(
[
'Specification-Title' : 'Galacticraft',
'Specification-Vendor' : 'TeamGalacticraft',
'Specification-Version' : "${version}",
'Implementation-Title' : 'Galacticraft',
'Implementation-Version' : "${version}",
'Implementation-Vendor' : 'TeamGalacticraft',
'Implementation-Build-Date' : new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
'FMLAT' : 'accesstransformer.cfg',
'FMLCorePluginContainsFMLMod' : 'true',
'FMLCorePlugin' : 'micdoodle8.mods.miccore.MicdoodlePlugin',
'Built-On-Minecraft' : "${mc_version}",
'Built-On-Forge' : "${forge_version}",
'Built-On-Mapping' : "${mapping_channel}-${mapping_version}",
'Built-Using' : "ForgeGradle: 5.1.+"
] as LinkedHashMap
)
}

jar {
manifest(setManifest)
archiveVersion.set("${mc_version}-${version}")
}

jar.finalizedBy('reobfJar')

task sourcesJar(type: Jar, dependsOn: classes) {
duplicatesStrategy(DuplicatesStrategy.FAIL)
archiveClassifier.set('sources')
archiveVersion.set("${mc_version}-${version}")
from sourceSets.main.allSource
}

task deobfJar(type: Jar) {
duplicatesStrategy(DuplicatesStrategy.FAIL)
archiveClassifier.set('deobf')
archiveVersion.set("${mc_version}-${version}")
from sourceSets.main.output
from sourceSets.main.allJava
manifest(setManifest)
}

task mavenJar(type: Jar) {
duplicatesStrategy(DuplicatesStrategy.INCLUDE)
manifest(setManifest)
archiveVersion.set("${mc_version}-${version}-maven")
from(sourceSets.main.output) {
exclude 'micdoodle8/mods/miccore/IntCache.*'
}
from("${projectDir}/etc/replace") {
include 'IntCache.class'
into 'micdoodle8/mods/miccore'
}
}

artifacts {
archives deobfJar
archives sourcesJar
archives mavenJar
compileRequire fg.deobf('mod.dependency:mekanism:9.8.3.390')
compileRequire fg.deobf('mod.dependency:industrialcraft-2:2.8.222-ex112')
compileRequire fg.deobf('mod.dependency:buildcraft-api:7.99.24.8')
compileOnly fg.deobf('mod.dependency:biomes-o-plenty:7.0.1.2445')
compileOnly fg.deobf('mod.dependency:appliedenergistics2:rv6-stable-7')
compileOnly fg.deobf('mod.dependency:redstoneflux:2.1.1.1')
compileOnly fg.deobf('mod.dependency:actuallyadditions:r152')
compileOnly fg.deobf('mod.dependency:playerapi:1.1')
compileOnly fg.deobf('mod.dependency:journeymap:5.7.1')
compileOnly fg.deobf('mod.dependency:jei:4.16.1.302:api')
runtimeOnly fg.deobf('mod.dependency:jei:4.16.1.302')
}

apply from: 'gradle/maven.gradle'
apply from: 'gradle/resources.gradle'

license {
header = project.file('etc/license/HEADER')
header = project.file('etc/HEADER')
properties {
company = 'Team Galacticraft'
year = Calendar.getInstance().get(Calendar.YEAR);
Expand Down
File renamed without changes.
File renamed without changes.
19 changes: 12 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
org.gradle.daemon=false

mc_version = 1.12.2
forge_version = 14.23.5.2860
mapping_channel = stable
mapping_version = 39-1.12
internal.maven.sign=false

mc_version=1.12.2
forge_version=14.23.5.2860
mapping_channel=stable
mapping_version=39-1.12

mod_version=4.0.4
version_suffix=

##Allows using your skin while testing, This can be with or without hyphens
##uuid =
##username =
##accessToken =
##uuid =
##username =
##accessToken =
86 changes: 0 additions & 86 deletions gradle/maven.gradle

This file was deleted.

5 changes: 1 addition & 4 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
pluginManagement {
repositories {
maven {
url = 'https://maven.galacticraft.net/repository/common-proxy/'
}
maven {
url = 'https://repo.galacticraft.net/repository/maven-common/'
url = 'https://maven.galacticraft.net/repository/gradle/'
}
}
}
Loading

0 comments on commit b1500a4

Please sign in to comment.