forked from SpongePowered/Mixin
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
293 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 = 'net.fabricmc' | ||
archivesBaseName = 'sponge-mixin' | ||
version = buildVersion + "+mixin." + upstreamMixinVersion | ||
|
||
base { | ||
archivesName = 'sponge-mixin' | ||
} | ||
|
||
def ENV = System.getenv() | ||
if (!ENV.CI) { | ||
|
@@ -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 | ||
|
@@ -76,26 +78,6 @@ repositories { | |
} | ||
} | ||
|
||
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 | ||
} | ||
} | ||
|
||
sourceSets { | ||
legacy { | ||
ext.languageVersion = 8 | ||
|
@@ -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 | ||
|
@@ -248,7 +250,6 @@ javadoc { | |
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 { | ||
|
@@ -334,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 | ||
|
@@ -440,7 +439,7 @@ task sourceJar(type: Jar) { | |
} | ||
|
||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
from javadoc.destinationDir | ||
from javadoc.destinationDir | ||
archiveClassifier = "javadoc" | ||
} | ||
|
||
|
@@ -465,7 +464,7 @@ publishing { | |
publications { | ||
developer(MavenPublication) { publication -> | ||
groupId project.group | ||
artifactId project.archivesBaseName | ||
artifactId project.base.archivesName.get() | ||
version project.version | ||
|
||
artifact sourceJar | ||
|
@@ -498,45 +497,45 @@ publishing { | |
} | ||
} | ||
|
||
pom { | ||
name = "Fabric Mixin" | ||
description = 'Fabric Mixin is a trait/mixin and bytecode weaving framework for Java using ASM.' | ||
url = 'https://github.com/FabricMC/Mixin' | ||
|
||
scm { | ||
connection = "scm:git:https://github.com/FabricMC/Mixin.git" | ||
developerConnection = "scm:git:[email protected]:FabricMC/Mixin.git" | ||
url = "https://github.com/FabricMC/Mixin" | ||
} | ||
|
||
issueManagement { | ||
system = "GitHub" | ||
url = "https://github.com/FabricMC/Mixin/issues" | ||
} | ||
|
||
licenses { | ||
license { | ||
name = 'The MIT License' | ||
url = 'https://raw.githubusercontent.com/FabricMC/Mixin/main/LICENSE.txt' | ||
} | ||
} | ||
|
||
developers { | ||
// Et. al. that arent in the fabric org on maven central | ||
|
||
developer { | ||
id = "modmuss50" | ||
name = "modmuss50" | ||
email = "[email protected]" | ||
} | ||
|
||
developer { | ||
id = "sfPlayer" | ||
name = "Player" | ||
email = "[email protected]" | ||
} | ||
} | ||
} | ||
pom { | ||
name = "Fabric Mixin" | ||
description = 'Fabric Mixin is a trait/mixin and bytecode weaving framework for Java using ASM.' | ||
url = 'https://github.com/FabricMC/Mixin' | ||
|
||
scm { | ||
connection = "scm:git:https://github.com/FabricMC/Mixin.git" | ||
developerConnection = "scm:git:[email protected]:FabricMC/Mixin.git" | ||
url = "https://github.com/FabricMC/Mixin" | ||
} | ||
|
||
issueManagement { | ||
system = "GitHub" | ||
url = "https://github.com/FabricMC/Mixin/issues" | ||
} | ||
|
||
licenses { | ||
license { | ||
name = 'The MIT License' | ||
url = 'https://raw.githubusercontent.com/FabricMC/Mixin/main/LICENSE.txt' | ||
} | ||
} | ||
|
||
developers { | ||
// Et. al. that arent in the fabric org on maven central | ||
|
||
developer { | ||
id = "modmuss50" | ||
name = "modmuss50" | ||
email = "[email protected]" | ||
} | ||
|
||
developer { | ||
id = "sfPlayer" | ||
name = "Player" | ||
email = "[email protected]" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
@@ -551,24 +550,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. | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.