Skip to content

Commit

Permalink
Migrate to github actions and fix 8.7-rc1 Closes #12
Browse files Browse the repository at this point in the history
  • Loading branch information
LexManos committed Feb 29, 2024
1 parent 564e943 commit dbda891
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 271 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish

on:
push:
branches: [ "master" ]

permissions:
contents: read

jobs:
build:
uses: MinecraftForge/SharedActions/.github/workflows/gradle.yml@main
with:
java: 17
gradle_tasks: "publish"
artifact_name: "artifactural"
secrets:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
PROMOTE_ARTIFACT_WEBHOOK: ${{ secrets.PROMOTE_ARTIFACT_WEBHOOK }}
PROMOTE_ARTIFACT_USERNAME: ${{ secrets.PROMOTE_ARTIFACT_USERNAME }}
PROMOTE_ARTIFACT_PASSWORD: ${{ secrets.PROMOTE_ARTIFACT_PASSWORD }}
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
104 changes: 0 additions & 104 deletions .teamcity/pom.xml

This file was deleted.

69 changes: 0 additions & 69 deletions .teamcity/settings.kts

This file was deleted.

87 changes: 0 additions & 87 deletions Jenkinsfile

This file was deleted.

19 changes: 8 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,23 @@ import org.objectweb.asm.Label
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.InsnNode
import org.objectweb.asm.tree.MethodInsnNode
import net.minecraftforge.gradleutils.PomUtils

plugins {
id 'java-library'
id 'maven-publish'
id 'eclipse'
id 'org.cadixdev.licenser' version '0.6.1'
id 'net.minecraftforge.gradleutils' version '2.+'
id 'net.minecraftforge.gradleutils' version '[2.3,2.4]'
id 'net.minecraftforge.licenser' version '1.0.1'
id 'dev.gradleplugins.gradle-plugin-development' version '1.6.10'
}

group = 'net.minecraftforge'
version = gradleutils.getTagOffsetVersion()
version = gradleutils.tagOffsetVersion
println "Version: $version"
println "Java: ${System.getProperty 'java.version'} JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}) Arch: ${System.getProperty 'os.arch'}"

java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
toolchain.languageVersion = JavaLanguageVersion.of(8)
withSourcesJar()
}

Expand Down Expand Up @@ -234,17 +231,17 @@ publishing {
description = 'A Gradle artifact processing and management tool'
url = 'https://github.com/MinecraftForge/Artifactural/'

PomUtils.setGitHubDetails(pom, 'Artifactural')
gradleutils.pom.setGitHubDetails(pom, 'Artifactural')

license PomUtils.Licenses.LGPLv2_1
license gradleutils.pom.Licenses.LGPLv2_1
}
}

repositories {
maven gradleutils.getPublishingForgeMaven()
maven gradleutils.publishingForgeMaven
}
}

changelog {
fromTag '3.0'
from '3.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ private static ObjectFactory getObjectFactory(DefaultMavenLocalArtifactRepositor
}

private static VersionParser getVersionParser(DefaultMavenLocalArtifactRepository maven) {
if (GradleVersion.current().compareTo(GradleVersion.version("8.7-rc-1")) >= 0) {
// 8.7 RC 1 Removed the versionParser field directly, so find it from AbstractArtifactRepository
// https://github.com/gradle/gradle/commit/4604475e2237910ea0a1b697f4e7d5d0d4c74431
return ReflectionUtils.get(maven, "repositoryContentDescriptor.versionParser");
}
return ReflectionUtils.get(maven, "versionParser");
}

Expand Down

0 comments on commit dbda891

Please sign in to comment.