Skip to content

Commit c08fc18

Browse files
fix snapshot publishing (#302)
1 parent 453e410 commit c08fc18

File tree

3 files changed

+32
-18
lines changed

3 files changed

+32
-18
lines changed

.github/workflows/build.yml

+22-13
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,28 @@ jobs:
2626
uses: actions/checkout@v4.1.7
2727

2828
- name: Validate Gradle Wrapper
29-
uses: gradle/wrapper-validation-action@v3.4.1
29+
uses: gradle/actions/wrapper-validation@v3.5.0
3030

3131
- name: Configure JDK ${{ env.JAVA_VERSION }}
3232
uses: actions/setup-java@v4.2.1
3333
with:
3434
distribution: temurin
3535
java-version: ${{ env.JAVA_VERSION }}
36-
cache: gradle
3736

3837
- name: Setup Gradle
39-
uses: gradle/actions/setup-gradle@v3.4.1
38+
uses: gradle/actions/setup-gradle@v3.5.0
39+
with:
40+
gradle-home-cache-cleanup: true
41+
42+
- run: ./gradlew --version
43+
44+
- name: Run Ktlint Check On All Sources
45+
run: ./gradlew ktlintCheck -s
4046

41-
- name: Run Build
42-
run: ./gradlew ktlintCheck build -s
43-
44-
- name: Run Unit Tests
47+
- name: Run Build and Unit Tests
48+
run: ./gradlew build -s
49+
50+
- name: Publish to maven local to run instrumentation tests
4551
run: rm -rf ~/.m2/repository/com/jaredsburrows/gradle-spoon-plugin/ && ./gradlew publishToMavenLocal -x test -s
4652

4753
- name: Enable KVM group perms
@@ -74,14 +80,14 @@ jobs:
7480
script: cd test-app && ../gradlew clean spoonDebugAndroidTest checkReports -s && cd ..
7581

7682
- name: Publish Test Report
77-
uses: EnricoMi/publish-unit-test-result-action/composite@v2.16.1
83+
uses: EnricoMi/publish-unit-test-result-action@v2.17.0
7884
if: always()
7985
with:
8086
comment_mode: off
8187
files: '**/build/test-results/test/TEST-*.xml'
8288

8389
- name: Upload Artifacts
84-
uses: actions/upload-artifact@v4.3.3
90+
uses: actions/upload-artifact@v4.3.4
8591
if: github.repository == 'jaredsburrows/gradle-spoon-plugin' && github.ref == 'refs/heads/master'
8692
with:
8793
name: gradle-spoon-plugin-${{ github.workflow }}-${{ github.run_id }}
@@ -105,20 +111,23 @@ jobs:
105111
uses: actions/checkout@v4.1.7
106112

107113
- name: Validate Gradle Wrapper
108-
uses: gradle/wrapper-validation-action@v3.4.1
114+
uses: gradle/actions/wrapper-validation@v3.5.0
109115

110116
- name: Configure JDK ${{ env.JAVA_VERSION }}
111117
uses: actions/setup-java@v4.2.1
112118
with:
113119
distribution: temurin
114120
java-version: ${{ env.JAVA_VERSION }}
115-
cache: gradle
116121

117122
- name: Setup Gradle
118-
uses: gradle/actions/setup-gradle@v3.4.1
123+
uses: gradle/actions/setup-gradle@v3.5.0
124+
with:
125+
gradle-home-cache-cleanup: true
126+
127+
- run: ./gradlew --version
119128

120129
- name: Publish
121-
run: ./gradlew publish -s
130+
run: ./gradlew publish -s -i
122131
env:
123132
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
124133
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}

gradle-spoon-plugin/build.gradle

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
plugins {
2-
id 'org.jetbrains.kotlin.jvm' version '2.0.0'
3-
id 'org.jetbrains.dokka' version '1.9.20'
4-
id 'org.jlleitschuh.gradle.ktlint' version '11.6.1'
5-
id 'com.vanniktech.maven.publish' version '0.25.3'
6-
id 'com.gradle.plugin-publish' version '0.21.0'
2+
id 'org.jetbrains.kotlin.jvm'
3+
id 'org.jetbrains.dokka'
4+
id 'org.jlleitschuh.gradle.ktlint'
5+
id 'com.vanniktech.maven.publish'
6+
id 'com.gradle.plugin-publish'
7+
id 'com.github.ben-manes.versions'
78
id 'java-gradle-plugin'
89
id 'java-library'
910
id 'groovy'

gradle.properties

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
SONATYPE_HOST=DEFAULT
2+
SONATYPE_AUTOMATIC_RELEASE=true
3+
RELEASE_SIGNING_ENABLED=true
4+
15
GROUP=com.jaredsburrows
26
VERSION_NAME=1.6.1-SNAPSHOT
37

0 commit comments

Comments
 (0)