Skip to content

Commit

Permalink
Publish to plugin portal
Browse files Browse the repository at this point in the history
Update/Shade JGit
  • Loading branch information
LexManos committed Dec 1, 2023
1 parent a952ffe commit 4f7c462
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
uses: MinecraftForge/SharedActions/.github/workflows/gradle.yml@main
with:
java: 8
gradle_tasks: "publish"
gradle_tasks: "publish publishPlugins"
artifact_name: "gradleutils"
secrets:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
Expand All @@ -21,3 +21,5 @@ jobs:
PROMOTE_ARTIFACT_PASSWORD: ${{ secrets.PROMOTE_ARTIFACT_PASSWORD }}
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
20 changes: 19 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ plugins {
id 'groovy'
id 'maven-publish'
id 'org.cadixdev.licenser' version '0.6.1'
id 'com.gradle.plugin-publish' version '1.2.1'
id 'net.minecraftforge.gradleutils'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}

group 'net.minecraftforge'
Expand All @@ -15,7 +17,7 @@ repositories {
}

dependencies {
implementation 'org.eclipse.jgit:org.eclipse.jgit:5.10.0.202012080955-r'
implementation 'org.eclipse.jgit:org.eclipse.jgit:6.7.0.202309050840-r'
}

java {
Expand All @@ -36,18 +38,34 @@ license {
}

gradlePlugin {
website = 'https://github.com/MinecraftForge/GradleUtils'
vcsUrl = 'https://github.com/MinecraftForge/GradleUtils.git'
plugins {
gradleutils {
id = 'net.minecraftforge.gradleutils'
implementationClass = 'net.minecraftforge.gradleutils.GradleUtilsPlugin'
displayName = 'Forge Gradle Utilities'
description = 'Small collection of utilities for standerdizing our gradle scripts'
}
changelog {
id = 'net.minecraftforge.changelog'
implementationClass = 'net.minecraftforge.gradleutils.changelog.ChangelogPlugin'
displayName = 'Git Changelog'
description = 'Creates a changelog text file based on git history'
}
}
}

jar {
archiveClassifier = 'thin'
}

tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
enableRelocation true
archiveClassifier = null
relocationPrefix = 'net.minecraftforge.gradleutils.shadow'
}

changelog {
fromBase()
publishAll = false
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
org.gradle.configureondemand=true
org.gradle.caching=true
org.gradle.parallel=true
org.gradle.configureondemand=true
#org.gradle.configuration-cache=true
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ class GradleUtils {
git = Git.open(dir)
} catch (RepositoryNotFoundException e) {
return [
tag: '0.0',
offset: '0',
hash: '00000000',
branch: 'master',
commit: '0000000000000000000000',
abbreviatedId: '00000000'
tag: '0.0',
offset: '0',
hash: '00000000',
branch: 'master',
commit: '0000000000000000000000',
abbreviatedId: '00000000'
]
}
String tag = git.describe().setLong(true).setTags(true).setMatch(globFilters ?: new String[0]).call()
Expand Down

0 comments on commit 4f7c462

Please sign in to comment.