Begin RFG move. Common module compiles

This commit is contained in:
makamys committed 2023-10-19 01:49:42 +02:00
1 parent 9aa07d509c
commit ba1f02d541
4 files changed
+41 -51

No files matched your search

+18 -1
View File
@@ -18,7 +18,24 @@ buildscript {
}
plugins {
id 'com.github.johnrengelman.shadow' version '6.1.0' apply false
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
id("java-library")
id("maven-publish")
id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.7"
id("eclipse")
id("com.gtnewhorizons.retrofuturagradle") version "1.3.19"
}
// Set the toolchain version to decouple the Java we run Gradle with from the Java used to compile and run the mod
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
// Azul covers the most platforms for Java 8 toolchains, crucially including MacOS arm64
vendor.set(org.gradle.jvm.toolchain.JvmVendorSpec.AZUL)
}
// Generate sources and javadocs jars when building and publishing
withSourcesJar()
withJavadocJar()
}
allprojects {
+2 -47
View File
@@ -1,6 +1,6 @@
/** Common code for Forge 1.7.10 builds */
apply plugin: 'forge'
apply plugin: "com.gtnewhorizons.retrofuturagradle"
ext.publishDir = project.multiproject_structure.toBoolean() ? "${projectDir}/../publish" : "${rootDir}/publish"
@@ -48,62 +48,17 @@ group = project.group
archivesBaseName = "${project.archives_base}-${project.minecraft_version}"
minecraft {
version = "${project.minecraft_version}-${project.forge_version}"
runDir = "run"
replace '@VERSION@', project.version
}
// These settings allow you to choose what version of Java you want to be compatible with. Forge 1.7.10 runs on Java 6 to 8.
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
maven {
name = "chickenbones"
url = "http://chickenbones.net/maven/"
}
}
configurations {
embed
compile.extendsFrom(embed)
shade
compile.extendsFrom(shade)
mcVersion.set("1.7.10")
}
if(project.enable_mixin.toBoolean()) {
apply from: "buildscript/forge-1.7-mixin.gradle"
}
project.ext.override_dependencies = false
if(file("project.gradle").exists()){
apply from: "project.gradle"
}
if(!project.ext.override_dependencies) {
dependencies {
runtimeOnly "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev"
runtimeOnly "codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev"
}
}
jar {
from(sourceSets.main.output);
// embed libraries in jar
from configurations.embed.collect {
exclude '**/LICENSE', '**/LICENSE.txt'
it.isDirectory() ? it : zipTree(it)
}
configurations.shade.each { dep ->
from(project.zipTree(dep)){
exclude '**/LICENSE', '**/LICENSE.txt', 'META-INF', 'META-INF/**'
}
}
}
processResources {
// This will ensure that this task is redone when the versions or any
// user-defined properties change.
+1 -1
View File
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
+20 -2
View File
@@ -1,4 +1,22 @@
include 'module-mixin'
pluginManagement {
repositories {
maven {
// RetroFuturaGradle
name = "GTNH Maven"
url = uri("http://jenkins.usrv.eu:8081/nexus/content/groups/public/")
allowInsecureProtocol = true
mavenContent {
includeGroup("com.gtnewhorizons")
includeGroup("com.gtnewhorizons.retrofuturagradle")
}
}
gradlePluginPortal()
mavenCentral()
mavenLocal()
}
}
/*include 'module-mixin'
include 'module-compat'
include 'module-devcompat'
include 'module-mixingasm'
@@ -7,5 +25,5 @@ include 'module-mixinbooterlegacy'
include 'module-gasstation'
include 'module-gtnhmixins'
include 'module-mixinextras'
include 'module-all'
include 'module-all'*/
include 'module-common'