Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchej123 committed Jul 10, 2024
2 parents d6b6f18 + 9aca17d commit f2f93d5
Show file tree
Hide file tree
Showing 134 changed files with 5,012 additions and 1,554 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [8-jdk, 11-jdk, 16-jdk, 17-jdk]
runs-on: ubuntu-20.04
java: [17-jdk, 21-jdk]
runs-on: ubuntu-24.04
container:
image: openjdk:${{ matrix.java }}
image: eclipse-temurin:${{ matrix.java }}
options: --user root
steps:
- uses: actions/checkout@v1
- uses: gradle/wrapper-validation-action@v1
- run: ./gradlew build publishToMavenLocal --stacktrace
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
- run: ./gradlew build publishToMavenLocal --stacktrace --warning-mode fail
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ name: Release
on: [workflow_dispatch] # Manual trigger
jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
container:
image: openjdk:17-jdk
image: eclipse-temurin:21-jdk
options: --user root
steps:
- uses: actions/checkout@v1
- uses: gradle/wrapper-validation-action@v1
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
- run: ./gradlew checkVersion build publish --stacktrace
env:
MAVEN_URL: ${{ secrets.MAVEN_URL }}
Expand Down
136 changes: 68 additions & 68 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ buildscript {
}
dependencies {
classpath 'gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.16.1'
classpath 'gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.0.0'
classpath 'com.guardsquare:proguard-gradle:' + (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11) ? '7.2.0' : '7.1.0')
classpath 'com.guardsquare:proguard-gradle:' + (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11) ? '7.5.0' : '7.1.0')
}
}

plugins {
id "me.modmuss50.remotesign" version "0.4.0"
id "me.modmuss50.remotesign" version "0.4.0"
id "io.github.goooler.shadow" version "8.1.7"
}

import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
Expand All @@ -24,17 +24,18 @@ apply plugin: 'checkstyle'
apply plugin: 'maven-publish'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'potemkin-modules'

// Default tasks
defaultTasks 'licenseFormat', 'check', 'build'

// Basic project information
group = 'io.github.legacymoddingmc'
archivesBaseName = 'sponge-mixin'
version = buildVersion + "+mixin." + upstreamMixinVersion

base {
archivesName = 'sponge-mixin'
}

def ENV = System.getenv()
if (!ENV.CI) {
Expand All @@ -50,12 +51,13 @@ ext.packaging = 'jar'
ext.asmVersion = project.hasProperty("asmVersion") ? asmVersion : '9.0'
ext.legacyForgeAsmVersion = project.hasProperty("legacyForgeAsmVersion") ? asmVersion : '5.0.3'

// Minimum version of Java required
sourceCompatibility = '1.8'
targetCompatibility = '1.8'

java {
modularity.inferModulePath = false
disableAutoTargetJvm()

// Minimum version of Java required
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}

// Project repositories
Expand All @@ -71,40 +73,20 @@ repositories {
}
maven {
// For modlauncher
name = 'forge'
url = 'https://files.minecraftforge.net/maven'
}
}

configurations {
stagingJar

exampleImplementation .extendsFrom implementation
fernflowerImplementation .extendsFrom implementation
launchwrapperImplementation .extendsFrom implementation
agentImplementation .extendsFrom implementation
modlauncherImplementation .extendsFrom implementation
modlauncher9Implementation .extendsFrom modlauncherImplementation
modularityImplementation .extendsFrom modlauncher9Implementation
modularityCompileOnly .extendsFrom compileOnly

proguard {
extendsFrom fernflowerImplementation
extendsFrom launchwrapperImplementation
extendsFrom modlauncherImplementation
extendsFrom compileClasspath
name = 'neoforged'
url = 'https://maven.neoforged.net/releases'
}
}

sourceSets {
legacy {
ext.languageVersion = 8
ext.compatibility = '1.6'
ext.compatibility = '1.8'
}
main {
compileClasspath += legacy.output
ext.languageVersion = 8
ext.compatibility = '1.6'
ext.compatibility = '1.8'
}
ap {
compileClasspath += main.output
Expand All @@ -114,13 +96,13 @@ sourceSets {
fernflower {
compileClasspath += main.output
ext.languageVersion = 8
ext.compatibility = '1.6'
ext.compatibility = '1.8'
ext.modularityExcluded = true
}
agent {
compileClasspath += main.output
ext.languageVersion = 8
ext.compatibility = '1.6'
ext.compatibility = '1.8'
}
bridge {
compileClasspath += main.output
Expand Down Expand Up @@ -164,6 +146,26 @@ sourceSets {
modularityDummy {}
}

configurations {
stagingJar

exampleImplementation .extendsFrom implementation
fernflowerImplementation .extendsFrom implementation
launchwrapperImplementation .extendsFrom implementation
agentImplementation .extendsFrom implementation
modlauncherImplementation .extendsFrom implementation
modlauncher9Implementation .extendsFrom modlauncherImplementation
modularityImplementation .extendsFrom modlauncher9Implementation
modularityCompileOnly .extendsFrom compileOnly

proguard {
extendsFrom fernflowerImplementation
extendsFrom launchwrapperImplementation
extendsFrom modlauncherImplementation
extendsFrom compileClasspath
}
}

// Because Mixin aims to support a variety of environments, we have to be able to run with older versions of GSON and Guava that lack official module
// names. This means the same library may appear with multiple module names. We want to be able to link our module with either of these two at
// runtime, without having to have two versions of the library on our compile-time module path. To do this, we generate empty "potemkin" jars with
Expand Down Expand Up @@ -226,7 +228,7 @@ dependencies {
modlauncher9Implementation ("cpw.mods:modlauncher:$modlauncherVersion") {
exclude module: 'jopt-simple'
}
modlauncher9Implementation 'cpw.mods:securejarhandler:0.9.+'
modlauncher9Implementation 'cpw.mods:securejarhandler:2.1.24'

// asm bridge
bridgeImplementation 'org.apache.logging.log4j:log4j-core:2.0-beta9'
Expand All @@ -243,11 +245,11 @@ javadoc {
source sourceSets.ap.allJava
options.encoding = 'UTF-8'
exclude {
it.relativePath.file && it.relativePath.pathString =~ 'tools' && !(it.name =~ /SuppressedBy|package-info/) }
it.relativePath.file && it.relativePath.pathString =~ 'tools' && !(it.name =~ /SuppressedBy|package-info/)
}
options {
docTitle 'Welcome to the Mixin Javadoc'
overview 'docs/javadoc/overview.html'
stylesheetFile file('docs/javadoc/mixin.css')
addBooleanOption '-allow-script-in-comments', true
}
doLast {
Expand Down Expand Up @@ -320,7 +322,7 @@ checkstyle {
"year" : project.inceptionYear
]
configFile = file("checkstyle.xml")
toolVersion = '8.44'
toolVersion = '10.17.0'
}

// Source compiler configuration
Expand All @@ -333,10 +335,8 @@ tasks.withType(JavaCompile) {
def modularityInputs = objects.fileCollection()

project.sourceSets.each { set -> {
if (set.ext.has("languageVersion")) {
project.tasks[set.compileJavaTaskName].javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(set.ext.languageVersion)
}
if (set.ext.has("languageVersion") && JavaVersion.current().isJava9Compatible()) {
project.tasks[set.compileJavaTaskName].options.release = set.ext.languageVersion
}
if (set.ext.has("compatibility")) {
project.tasks[set.compileJavaTaskName].sourceCompatibility = set.ext.compatibility
Expand Down Expand Up @@ -439,7 +439,7 @@ task sourceJar(type: Jar) {
}

task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
from javadoc.destinationDir
archiveClassifier = "javadoc"
}

Expand All @@ -464,7 +464,7 @@ publishing {
publications {
developer(MavenPublication) { publication ->
groupId project.group
artifactId project.archivesBaseName
artifactId project.base.archivesName.get()
version project.version

artifact sourceJar
Expand Down Expand Up @@ -519,8 +519,8 @@ publishing {
}
}

developers {
// Et. al. that arent in the fabric org on maven central
developers {
// Et. al. that arent in the fabric org on maven central

developer {
id = "makamys"
Expand All @@ -534,13 +534,13 @@ publishing {
email = "[email protected]"
}

developer {
id = "sfPlayer"
name = "Player"
email = "[email protected]"
}
}
}
developer {
id = "sfPlayer"
name = "Player"
email = "[email protected]"
}
}
}
}
}

Expand All @@ -555,24 +555,24 @@ publishing {
}
}

if (ENV.MAVEN_CENTRAL_URL) {
repositories.maven {
name "central"
url ENV.MAVEN_CENTRAL_URL
credentials {
username ENV.MAVEN_CENTRAL_USERNAME
password ENV.MAVEN_CENTRAL_PASSWORD
}
}
}
if (ENV.MAVEN_CENTRAL_URL) {
repositories.maven {
name "central"
url ENV.MAVEN_CENTRAL_URL
credentials {
username ENV.MAVEN_CENTRAL_USERNAME
password ENV.MAVEN_CENTRAL_PASSWORD
}
}
}
}
}

remoteSign {
requestUrl = ENV.SIGNING_SERVER
pgpAuthKey = ENV.SIGNING_PGP_KEY
useDummyForTesting = ENV.SIGNING_SERVER == null
sign publishing.publications.developer
requestUrl = ENV.SIGNING_SERVER
pgpAuthKey = ENV.SIGNING_PGP_KEY
useDummyForTesting = ENV.SIGNING_SERVER == null
sign publishing.publications.developer
}

// A task to ensure that the version being released has not already been released.
Expand Down
9 changes: 1 addition & 8 deletions checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Description: none
-->
<module name="Checker">
<property name="severity" value="warning"/>
<property name="severity" value="error"/>
<property name="charset" value="UTF-8"/>
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$"/>
Expand Down Expand Up @@ -131,13 +131,6 @@
<module name="UncommentedMain"/>
<module name="SuppressionCommentFilter"/>
</module>
<module name="LineLength">
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
<property name="max" value="150"/>
</module>
<module name="LineLength">
<property name="ignorePattern" value="^[ ]*([a-zA-Z0-9\{\}\+\|\&amp;\&quot;@\(\)\?\.\:]|//)"/>
</module>
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ packaging=jar
description=Mixin (LegacyModdingMC fork)
url=https://github.com/LegacyModdingMC
organization=LegacyModdingMC
buildVersion=0.13.0
upstreamMixinVersion=0.8.5
buildVersion=0.15.0
upstreamMixinVersion=0.8.7
buildType=RELEASE
asmVersion=9.6
legacyForgeAsmVersion=5.0.3
modlauncherAsmVersion=9.1
modlauncherVersion=9.0.7
modlauncherAsmVersion=9.5
modlauncherVersion=10.0.9
legacyModlauncherVersion=7.0.0
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit f2f93d5

Please sign in to comment.