mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-14 01:24:11 +00:00
Update to Gradle 8.14 (#174)
This commit is contained in:
1 parent
5334af3f15
commit
4d0e1dfd9a
10 files changed
+112
-61
No files matched your search
@@ -12,5 +12,5 @@ jobs:
|
||||
options: --user root
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: gradle/wrapper-validation-action@v2
|
||||
- uses: gradle/actions/wrapper-validation@v4
|
||||
- run: ./gradlew build publishToMavenLocal --stacktrace --warning-mode fail
|
||||
@@ -8,7 +8,7 @@ jobs:
|
||||
options: --user root
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: gradle/wrapper-validation-action@v2
|
||||
- uses: gradle/actions/wrapper-validation@v4
|
||||
- run: ./gradlew checkVersion build publish --stacktrace
|
||||
env:
|
||||
MAVEN_URL: ${{ secrets.MAVEN_URL }}
|
||||
|
||||
+24
-22
@@ -1,22 +1,24 @@
|
||||
This file is part of ${name}, licensed under the MIT License (MIT).
|
||||
|
||||
Copyright (c) ${organization} <${url}>
|
||||
Copyright (c) contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
+17
-28
@@ -5,21 +5,19 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.16.1'
|
||||
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 "io.github.goooler.shadow" version "8.1.7"
|
||||
id "me.modmuss50.remotesign" version "0.5.0"
|
||||
id "com.gradleup.shadow" version "9.0.0-beta17"
|
||||
}
|
||||
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
|
||||
// Apply plugin
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'com.github.hierynomus.license'
|
||||
apply plugin: 'checkstyle'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'eclipse'
|
||||
@@ -27,7 +25,7 @@ apply plugin: 'idea'
|
||||
apply plugin: 'potemkin-modules'
|
||||
|
||||
// Default tasks
|
||||
defaultTasks 'licenseFormat', 'check', 'build'
|
||||
defaultTasks 'check', 'build'
|
||||
|
||||
// Basic project information
|
||||
group = 'net.fabricmc'
|
||||
@@ -298,22 +296,13 @@ processResources {
|
||||
}
|
||||
|
||||
// License header formatting
|
||||
license {
|
||||
ext {
|
||||
name = "Mixin"
|
||||
organization = "SpongePowered"
|
||||
url = "https://www.spongepowered.org"
|
||||
}
|
||||
include '**/*.java'
|
||||
header file("HEADER.txt")
|
||||
sourceSets = project.sourceSets
|
||||
ignoreFailures false
|
||||
strictCheck true
|
||||
mapping {
|
||||
java = 'SLASHSTAR_STYLE'
|
||||
}
|
||||
def validateHeaders = tasks.register("validateHeaders", org.spongepowered.asm.mixin.build.ValidateLicenseHeadersTasks) {
|
||||
header = resources.text.fromFile("HEADER.txt")
|
||||
source = sourceSets.collect { it.allJava }
|
||||
}
|
||||
|
||||
tasks.check.dependsOn validateHeaders
|
||||
|
||||
checkstyle {
|
||||
configProperties = [
|
||||
"name" : project.name,
|
||||
@@ -463,9 +452,9 @@ ext.excludePomDeps = [
|
||||
publishing {
|
||||
publications {
|
||||
developer(MavenPublication) { publication ->
|
||||
groupId project.group
|
||||
artifactId project.base.archivesName.get()
|
||||
version project.version
|
||||
groupId = project.group
|
||||
artifactId = project.base.archivesName.get()
|
||||
version = project.version
|
||||
|
||||
artifact sourceJar
|
||||
artifact javadocJar
|
||||
@@ -542,10 +531,10 @@ publishing {
|
||||
repositories {
|
||||
if (ENV.MAVEN_URL) {
|
||||
maven {
|
||||
url ENV.MAVEN_URL
|
||||
url = ENV.MAVEN_URL
|
||||
credentials {
|
||||
username ENV.MAVEN_USERNAME
|
||||
password ENV.MAVEN_PASSWORD
|
||||
username = ENV.MAVEN_USERNAME
|
||||
password = ENV.MAVEN_PASSWORD
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -553,10 +542,10 @@ publishing {
|
||||
if (ENV.MAVEN_CENTRAL_URL) {
|
||||
repositories.maven {
|
||||
name "central"
|
||||
url ENV.MAVEN_CENTRAL_URL
|
||||
url = ENV.MAVEN_CENTRAL_URL
|
||||
credentials {
|
||||
username ENV.MAVEN_CENTRAL_USERNAME
|
||||
password ENV.MAVEN_CENTRAL_PASSWORD
|
||||
username = ENV.MAVEN_CENTRAL_USERNAME
|
||||
password = ENV.MAVEN_CENTRAL_PASSWORD
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ plugins {
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name 'sponge'
|
||||
url 'https://repo.spongepowered.org/repository/maven-public'
|
||||
name = 'sponge'
|
||||
url = 'https://repo.spongepowered.org/repository/maven-public'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* This file is part of Mixin, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) SpongePowered <https://www.spongepowered.org>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package org.spongepowered.asm.mixin.build
|
||||
|
||||
import org.gradle.api.resources.TextResource
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.gradle.api.tasks.SourceTask
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
|
||||
abstract class ValidateLicenseHeadersTasks extends SourceTask {
|
||||
@Input
|
||||
TextResource header
|
||||
|
||||
@TaskAction
|
||||
void run() {
|
||||
def headerStr = header.asString()
|
||||
def javaSources = getSource().matching(pattern -> pattern.include("**/*.java")).files
|
||||
|
||||
def failedFiles = []
|
||||
|
||||
for (def source : javaSources) {
|
||||
if (!source.text.startsWith(headerStr)) {
|
||||
failedFiles.add(source.name)
|
||||
logger.warn("File {} does not have the correct license header", source.path)
|
||||
}
|
||||
}
|
||||
|
||||
if (!failedFiles.isEmpty()) {
|
||||
throw new RuntimeException("License header validation failed for the following files:\n" +
|
||||
failedFiles.join("\n"))
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
@@ -84,7 +86,7 @@ done
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -112,7 +114,7 @@ case "$( uname )" in #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
CLASSPATH="\\\"\\\""
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
@@ -203,7 +205,7 @@ fi
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
@@ -211,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
|
||||
Vendored
+4
-2
@@ -13,6 +13,8 @@
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@@ -68,11 +70,11 @@ goto fail
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
set CLASSPATH=
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
||||
Reference in new issue
Block a user