Skip to content

Commit 225e30a

Browse files
committed
Adjust Metalava SemVer task
1 parent 9a07498 commit 225e30a

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

.github/workflows/metalava-semver-check.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ jobs:
99
permissions:
1010
pull-requests: write
1111
steps:
12-
- name: Checkout main
12+
- name: Checkout
1313
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
14-
with:
15-
ref: ${{ github.base_ref }}
1614

1715
- name: Set up JDK 17
1816
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
@@ -21,13 +19,13 @@ jobs:
2119
distribution: temurin
2220
cache: gradle
2321

24-
- name: Copy previous api.txt files
22+
- name: Copy new api.txt files
2523
run: ./gradlew copyApiTxtFile
2624

27-
- name: Checkout PR
25+
- name: Checkout main
2826
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2927
with:
30-
ref: ${{ github.head_ref }}
28+
ref: ${{ github.base_ref }}
3129
clean: false
3230

3331
- name: Run Metalava SemVer check

plugins/src/main/java/com/google/firebase/gradle/plugins/FirebaseJavaLibraryPlugin.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,12 @@ class FirebaseJavaLibraryPlugin : BaseFirebaseLibraryPlugin() {
106106

107107
project.tasks.register<CopyApiTask>("copyApiTxtFile") {
108108
apiTxtFile.set(project.file("api.txt"))
109-
output.set(project.file("previous_api.txt"))
109+
output.set(project.file("new_api.txt"))
110110
}
111111

112112
project.tasks.register<SemVerTask>("metalavaSemver") {
113-
apiTxtFile.set(project.file("api.txt"))
114-
otherApiFile.set(project.file("previous_api.txt"))
115-
outputApiFile.set(project.file("opi.txt"))
113+
apiTxtFile.set(project.file("new_api.txt"))
114+
otherApiFile.set(project.file("api.txt"))
116115
currentVersionString.value(firebaseLibrary.version)
117116
previousVersionString.value(firebaseLibrary.previousVersion)
118117
}

plugins/src/main/java/com/google/firebase/gradle/plugins/SemVerTask.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ abstract class SemVerTask : DefaultTask() {
3333
@get:Input abstract val currentVersionString: Property<String>
3434
@get:Input abstract val previousVersionString: Property<String>
3535

36-
@get:OutputFile abstract val outputApiFile: RegularFileProperty
37-
3836
@TaskAction
3937
fun run() {
4038
val previous = ModuleVersion.fromStringOrNull(previousVersionString.get()) ?: return

0 commit comments

Comments
 (0)