File tree 5 files changed +23
-8
lines changed
buildSrc/src/main/java/com/google/firebase/gradle/plugins 5 files changed +23
-8
lines changed Original file line number Diff line number Diff line change @@ -109,11 +109,13 @@ class FirebaseLibraryPlugin : BaseFirebaseLibraryPlugin() {
109
109
from(project.zipTree(" build/outputs/aar/${releaseAar} " ))
110
110
into(project.file(" semver/current-version" ))
111
111
}
112
+
112
113
project.tasks.register<Copy >(" extractPreviousClasses" ) {
113
114
dependsOn(" copyPreviousArtifacts" )
114
-
115
- from(project.zipTree(" semver/previous.aar" ))
116
- into(project.file(" semver/previous-version" ))
115
+ if (project.file(" semver/previous.aar" ).exists()) {
116
+ from(project.zipTree(" semver/previous.aar" ))
117
+ into(project.file(" semver/previous-version" ))
118
+ }
117
119
}
118
120
119
121
val currentJarFile = project.file(" semver/current-version/classes.jar" ).absolutePath
Original file line number Diff line number Diff line change @@ -43,10 +43,15 @@ abstract class PomValidator : DefaultTask() {
43
43
44
44
@TaskAction
45
45
fun run () {
46
- var diff = diffWithPomFromURL(getLatestReleasePomUrl())
46
+ try {
47
+ var diff = diffWithPomFromURL(getLatestReleasePomUrl())
47
48
48
- if (diff.isNotEmpty()) {
49
- throw GradleException (" Dependency version errors found:\n ${diff} " )
49
+ if (diff.isNotEmpty()) {
50
+ throw GradleException (" Dependency version errors found:\n ${diff} " )
51
+ }
52
+ } catch (_: java.io.FileNotFoundException ) {
53
+ // Gmaven artifact doesn't exist.
54
+ return
50
55
}
51
56
}
52
57
Original file line number Diff line number Diff line change @@ -40,6 +40,9 @@ abstract class ApiDiffer : DefaultTask() {
40
40
41
41
@TaskAction
42
42
fun run () {
43
+ if (version.get().contains(" beta" ) || previousVersionString.get().isNullOrEmpty()) {
44
+ return
45
+ }
43
46
val (pMajor, pMinor, _) = previousVersionString.get().split(" ." )
44
47
val (major, minor, _) = version.get().split(" ." )
45
48
val curVersionDelta: VersionDelta =
Original file line number Diff line number Diff line change @@ -41,6 +41,11 @@ abstract class GmavenCopier : DefaultTask() {
41
41
mavenHelper.getLatestReleasedVersion(),
42
42
! aarAndroidFile.get()
43
43
)
44
- URL (gMavenPath).openStream().use { Files .copy(it, Paths .get(filePath.get())) }
44
+ try {
45
+ URL (gMavenPath).openStream().use { Files .copy(it, Paths .get(filePath.get())) }
46
+ } catch (_: java.io.FileNotFoundException ) {
47
+ // Gmaven Artifact doesn't exist.
48
+ return
49
+ }
45
50
}
46
51
}
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ dependencies {
51
51
implementation project(' :firebase-config' )
52
52
implementation ' com.google.firebase:firebase-abt:21.1.1'
53
53
implementation ' com.google.firebase:firebase-installations-interop:17.1.0'
54
- runtimeOnly project( ' :firebase-installations' )
54
+ runtimeOnly ' com.google.firebase :firebase-installations:17.1.2 '
55
55
56
56
implementation ' androidx.annotation:annotation:1.1.0'
57
57
You can’t perform that action at this time.
0 commit comments