Skip to content

Commit

Permalink
Update to javadoctor 2.0.10 and change versioning/publishing system
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebemish committed Oct 29, 2023
1 parent 1aaf588 commit a51d2ad
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 24 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,27 @@ jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Setup Java
run: |
echo "JAVA_HOME=$JAVA_HOME_17_X64" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: fregante/setup-git-user@v2
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: 17
- uses: gradle/gradle-build-action@v2
with:
arguments: build
cache-read-only: ${{ !startsWith(github.ref, 'refs/heads/1.') }}
- uses: gradle/gradle-build-action@v2
name: Setup Gradle
with:
arguments: publishPlugins
cache-read-only: ${{ !startsWith(github.ref, 'refs/heads/1.') }}
- name: Tag Release
run: ./gradlew tagRelease --configuration-cache
- name: Build
run: ./gradlew build --configuration-cache
- name: Publish
run: ./gradlew publishPlugins --configuration-cache
env:
GRADLE_PLUGIN_KEY: ${{ secrets.GRADLE_PLUGIN_KEY }}
GRADLE_PLUGIN_SECRET: ${{ secrets.GRADLE_PLUGIN_SECRET }}
GRADLE_PLUGIN_KEY: ${{ secrets.GRADLE_PLUGIN_KEY }}
GRADLE_PLUGIN_SECRET: ${{ secrets.GRADLE_PLUGIN_SECRET }}
- name: Push Changes
run: |
git push
git push --tags
14 changes: 8 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
plugins {
id 'java-gradle-plugin'
id 'com.gradle.plugin-publish' version '1.2.1'
id 'dev.lukebemish.managedversioning' version '1.0.0'
}

group = 'dev.lukebemish.docpatcher'
version = '0.3.4'

java {
// I don't feel like dealing with old java...
Expand All @@ -14,15 +14,17 @@ java {

repositories {
mavenCentral()
maven {
name = "NeoForged"
url = "https://maven.neoforged.net/releases/"
}
}

managedVersioning {
versionFile.set rootProject.file('version.properties')
}

managedVersioning.apply()

dependencies {
compileOnly 'org.jetbrains:annotations:24.0.1'
implementation 'net.neoforged.javadoctor:injector-spoon:2.0.5'
implementation 'net.neoforged.javadoctor:injector-spoon:2.0.10'
implementation 'fr.inria.gforge.spoon:spoon-core:10.4.1'
implementation 'com.google.guava:guava:32.1.2-jre'
implementation 'org.apache.commons:commons-text:1.10.0'
Expand Down
13 changes: 13 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
pluginManagement {
repositories {
maven {
name = "Luke's Maven"
url = 'https://maven.lukebemish.dev/releases/'
content {
includeGroupAndSubgroups 'dev.lukebemish'
}
}
gradlePluginPortal()
}
}

rootProject.name = 'docpatcher'
6 changes: 0 additions & 6 deletions test/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
pluginManagement {
includeBuild('../')
repositories {
maven {
name = "NeoForged"
url = "https://maven.neoforged.net/releases/"
}
}
}

rootProject.name = 'DocPatcherTest'
1 change: 1 addition & 0 deletions version.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version=0.3.4

0 comments on commit a51d2ad

Please sign in to comment.