Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
Update to Gradle 8.4 and GU 3
  • Loading branch information
Matyrobbrt committed Dec 2, 2023
1 parent 6784e35 commit aaf82a3
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 66 deletions.
79 changes: 19 additions & 60 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
buildscript {
repositories {
mavenCentral()
maven { url = 'https://maven.neoforged.net/' }
}
dependencies {
classpath group: 'net.neoforged.gradleutils', name: 'GradleUtils', version: '[2.0.18,)', changing: true
}
}
import net.neoforged.gradleutils.PomUtilsExtension.License

plugins {
id 'eclipse'
Expand All @@ -15,20 +7,29 @@ plugins {
id 'maven-publish'
id 'org.cadixdev.licenser' version '0.6.1'
id 'com.github.johnrengelman.shadow' version '7.0.0'
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
id 'net.neoforged.gradleutils' version '3.0.0-alpha.5'
}
apply plugin: 'net.neoforged.gradleutils'

group 'net.neoforged'
version = gradleutils.getTagOffsetBranchVersion(null, 'main', 'HEAD')

gradleutils {
version {
branches {
suffixBranch = true
}
}
setupCentralPublishing()
setupSigning(signAllPublications: true)
}

version = gradleutils.version
println('Version: ' + version)

java.toolchain.languageVersion = JavaLanguageVersion.of(8)
compileJava.options.encoding = 'UTF-8'

ext {
CHANGELOG = rootProject.file('build/changelog.txt')
REPO = 'AutoRenamingTool'
TITLE = 'Auto Renaming Tool'
MANIFEST = manifest{
attributes('Main-Class': 'net.minecraftforge.fart.Main')
Expand Down Expand Up @@ -101,66 +102,24 @@ shadowJar {

assemble.dependsOn shadowJar

nexusPublishing {
repositories {
sonatype {
username.set(System.getenv('SONATYPE_USER') ?: '')
password.set(System.getenv('SONATYPE_PASSWORD') ?: '')
nexusUrl.set(uri('https://s01.oss.sonatype.org/service/local/'))
}
}
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = TITLE
description = 'A tool that renames java bytecode elements.'
url = "https://github.com/neoforged/${REPO}"
scm {
url = "https://github.com/neoforged/${REPO}"
connection = "scm:git:git://github.com/neoforged/${REPO}.git"
developerConnection = "scm:git:git@github.com:neoforged/${REPO}.git"
}
issueManagement {
system = 'github'
url = "https://github.com/neoforged/${REPO}/issues"
}

licenses {
license {
name = 'LGPLv2.1'
url = 'https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt'
}
}

developers {
developer {
id = 'neoforged'
name = 'NeoForged'
email = 'contact@neoforged.net'
url = 'https://github.com/NeoForged/'
}
}
pomUtils.neoForgedDeveloper(it)
pomUtils.license(it, License.LGPL_v2)
pomUtils.githubRepo(it, 'AutoRenamingTool')
}
}
}
repositories {
maven gradleutils.getPublishingForgeMaven()
}
}

if (System.getenv('GPG_PRIVATE_KEY')) {
signing {
final signingKey = System.getenv('GPG_PRIVATE_KEY') ?: ''
final signingPassword = System.getenv('GPG_KEY_PASSWORD') ?: ''
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
maven gradleutils.publishingMaven
}
}

changelog {
fromTag INITIAL_CHANGELOG_TAG
from INITIAL_CHANGELOG_TAG
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
10 changes: 5 additions & 5 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,10 +32,10 @@
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
Expand Down

0 comments on commit aaf82a3

Please sign in to comment.