File tree Expand file tree Collapse file tree 4 files changed +11
-16
lines changed
plugins/src/main/java/com/google/firebase/gradle/plugins Expand file tree Collapse file tree 4 files changed +11
-16
lines changed Original file line number Diff line number Diff line change 9
9
permissions :
10
10
pull-requests : write
11
11
steps :
12
- - name : Checkout main
12
+ - name : Checkout PR
13
13
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
14
- with :
15
- ref : ${{ github.base_ref }}
16
14
17
15
- name : Set up JDK 17
18
16
uses : actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
@@ -21,13 +19,13 @@ jobs:
21
19
distribution : temurin
22
20
cache : gradle
23
21
24
- - name : Copy previous api.txt files
22
+ - name : Copy new api.txt files
25
23
run : ./gradlew copyApiTxtFile
26
24
27
- - name : Checkout PR
25
+ - name : Checkout main
28
26
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29
27
with :
30
- ref : ${{ github.head_ref }}
28
+ ref : ${{ github.base_ref }}
31
29
clean : false
32
30
33
31
- name : Run Metalava SemVer check
Original file line number Diff line number Diff line change @@ -163,13 +163,12 @@ class FirebaseAndroidLibraryPlugin : BaseFirebaseLibraryPlugin() {
163
163
164
164
project.tasks.register<CopyApiTask >(" copyApiTxtFile" ) {
165
165
apiTxtFile.set(project.file(" api.txt" ))
166
- output.set(project.file(" previous_api .txt" ))
166
+ output.set(project.file(" new_api .txt" ))
167
167
}
168
168
169
169
project.tasks.register<SemVerTask >(" metalavaSemver" ) {
170
- apiTxtFile.set(project.file(" api.txt" ))
171
- otherApiFile.set(project.file(" previous_api.txt" ))
172
- outputApiFile.set(project.file(" opi.txt" ))
170
+ apiTxtFile.set(project.file(" new_api.txt" ))
171
+ otherApiFile.set(project.file(" api.txt" ))
173
172
currentVersionString.value(firebaseLibrary.version)
174
173
previousVersionString.value(firebaseLibrary.previousVersion)
175
174
}
Original file line number Diff line number Diff line change @@ -106,13 +106,12 @@ class FirebaseJavaLibraryPlugin : BaseFirebaseLibraryPlugin() {
106
106
107
107
project.tasks.register<CopyApiTask >(" copyApiTxtFile" ) {
108
108
apiTxtFile.set(project.file(" api.txt" ))
109
- output.set(project.file(" previous_api .txt" ))
109
+ output.set(project.file(" new_api .txt" ))
110
110
}
111
111
112
112
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" ))
116
115
currentVersionString.value(firebaseLibrary.version)
117
116
previousVersionString.value(firebaseLibrary.previousVersion)
118
117
}
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ import org.gradle.api.file.RegularFileProperty
24
24
import org.gradle.api.provider.Property
25
25
import org.gradle.api.tasks.Input
26
26
import org.gradle.api.tasks.InputFile
27
- import org.gradle.api.tasks.OutputFile
28
27
import org.gradle.api.tasks.TaskAction
29
28
30
29
abstract class SemVerTask : DefaultTask () {
@@ -33,7 +32,7 @@ abstract class SemVerTask : DefaultTask() {
33
32
@get:Input abstract val currentVersionString: Property <String >
34
33
@get:Input abstract val previousVersionString: Property <String >
35
34
36
- @get:OutputFile abstract val outputApiFile : RegularFileProperty
35
+ // TODO cache output
37
36
38
37
@TaskAction
39
38
fun run () {
You can’t perform that action at this time.
0 commit comments