Skip to content

Upgrade Gradle to 6.9 #3744

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ _artifacts
.DS_Store
firebase-crashlytics-ndk/.externalNativeBuild/
firebase-crashlytics-ndk/.cxx/
smoke-test-logs/
smoke-tests/build-debug-headGit-smoke-test
smoke-tests/firehorn.log
15 changes: 15 additions & 0 deletions appcheck/firebase-appcheck-debug-testing/api.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Signature format: 2.0
package com.google.firebase.appcheck.debug.testing {

public final class DebugAppCheckTestHelper {
method @NonNull public static com.google.firebase.appcheck.debug.testing.DebugAppCheckTestHelper fromInstrumentationArgs();
method public <E extends java.lang.Throwable> void withDebugProvider(@NonNull com.google.firebase.appcheck.debug.testing.DebugAppCheckTestHelper.MaybeThrowingRunnable<E>) throws E;
method public <E extends java.lang.Throwable> void withDebugProvider(@NonNull com.google.firebase.FirebaseApp, @NonNull com.google.firebase.appcheck.debug.testing.DebugAppCheckTestHelper.MaybeThrowingRunnable<E>) throws E;
}

public static interface DebugAppCheckTestHelper.MaybeThrowingRunnable<E extends java.lang.Throwable> {
method public void run() throws E;
}

}

10 changes: 10 additions & 0 deletions appcheck/firebase-appcheck-debug/api.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Signature format: 2.0
package com.google.firebase.appcheck.debug {

public class DebugAppCheckProviderFactory implements com.google.firebase.appcheck.AppCheckProviderFactory {
method @NonNull public com.google.firebase.appcheck.AppCheckProvider create(@NonNull com.google.firebase.FirebaseApp);
method @NonNull public static com.google.firebase.appcheck.debug.DebugAppCheckProviderFactory getInstance();
}

}

25 changes: 25 additions & 0 deletions appcheck/firebase-appcheck-interop/api.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Signature format: 2.0
package com.google.firebase.appcheck {

public abstract class AppCheckTokenResult {
ctor public AppCheckTokenResult();
method @Nullable public abstract com.google.firebase.FirebaseException getError();
method @NonNull public abstract String getToken();
}

}

package com.google.firebase.appcheck.interop {

public interface AppCheckTokenListener {
method public void onAppCheckTokenChanged(@NonNull com.google.firebase.appcheck.AppCheckTokenResult);
}

public interface InternalAppCheckTokenProvider {
method public void addAppCheckTokenListener(@NonNull com.google.firebase.appcheck.interop.AppCheckTokenListener);
method @NonNull public com.google.android.gms.tasks.Task<com.google.firebase.appcheck.AppCheckTokenResult> getToken(boolean);
method public void removeAppCheckTokenListener(@NonNull com.google.firebase.appcheck.interop.AppCheckTokenListener);
}

}

11 changes: 11 additions & 0 deletions appcheck/firebase-appcheck-playintegrity/api.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Signature format: 2.0
package com.google.firebase.appcheck.playintegrity {

public class PlayIntegrityAppCheckProviderFactory implements com.google.firebase.appcheck.AppCheckProviderFactory {
ctor public PlayIntegrityAppCheckProviderFactory();
method @NonNull public com.google.firebase.appcheck.AppCheckProvider create(@NonNull com.google.firebase.FirebaseApp);
method @NonNull public static com.google.firebase.appcheck.playintegrity.PlayIntegrityAppCheckProviderFactory getInstance();
}

}

10 changes: 10 additions & 0 deletions appcheck/firebase-appcheck-safetynet/api.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Signature format: 2.0
package com.google.firebase.appcheck.safetynet {

public class SafetyNetAppCheckProviderFactory implements com.google.firebase.appcheck.AppCheckProviderFactory {
method @NonNull public com.google.firebase.appcheck.AppCheckProvider create(@NonNull com.google.firebase.FirebaseApp);
method @NonNull public static com.google.firebase.appcheck.safetynet.SafetyNetAppCheckProviderFactory getInstance();
}

}

35 changes: 35 additions & 0 deletions appcheck/firebase-appcheck/api.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Signature format: 2.0
package com.google.firebase.appcheck {

public interface AppCheckProvider {
method @NonNull public com.google.android.gms.tasks.Task<com.google.firebase.appcheck.AppCheckToken> getToken();
}

public interface AppCheckProviderFactory {
method @NonNull public com.google.firebase.appcheck.AppCheckProvider create(@NonNull com.google.firebase.FirebaseApp);
}

public abstract class AppCheckToken {
ctor public AppCheckToken();
method public abstract long getExpireTimeMillis();
method @NonNull public abstract String getToken();
}

public abstract class FirebaseAppCheck implements com.google.firebase.appcheck.interop.InternalAppCheckTokenProvider {
ctor public FirebaseAppCheck();
method public abstract void addAppCheckListener(@NonNull com.google.firebase.appcheck.FirebaseAppCheck.AppCheckListener);
method @NonNull public abstract com.google.android.gms.tasks.Task<com.google.firebase.appcheck.AppCheckToken> getAppCheckToken(boolean);
method @NonNull public static com.google.firebase.appcheck.FirebaseAppCheck getInstance();
method @NonNull public static com.google.firebase.appcheck.FirebaseAppCheck getInstance(@NonNull com.google.firebase.FirebaseApp);
method public abstract void installAppCheckProviderFactory(@NonNull com.google.firebase.appcheck.AppCheckProviderFactory);
method public abstract void installAppCheckProviderFactory(@NonNull com.google.firebase.appcheck.AppCheckProviderFactory, boolean);
method public abstract void removeAppCheckListener(@NonNull com.google.firebase.appcheck.FirebaseAppCheck.AppCheckListener);
method public abstract void setTokenAutoRefreshEnabled(boolean);
}

public static interface FirebaseAppCheck.AppCheckListener {
method public void onAppCheckTokenChanged(@NonNull com.google.firebase.appcheck.AppCheckToken);
}

}

2 changes: 1 addition & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

plugins {
id "org.gradle.kotlin.kotlin-dsl" version "1.2.9"
id "org.gradle.kotlin.kotlin-dsl" version "1.4.9"
id "org.jlleitschuh.gradle.ktlint" version "9.2.1"
id 'com.github.sherter.google-java-format' version '0.9'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ private static void setupApiInformationAnalysis(Project project) {
task -> {
task.setOutputFile(metalavaOutputJarFile);
});

File apiTxt =
project.file("api.txt").exists()
? project.file("api.txt")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import org.gradle.api.Project
import org.gradle.api.artifacts.Configuration
import org.gradle.api.file.FileCollection
import org.gradle.api.tasks.InputFiles
import org.gradle.api.tasks.Nested
import org.gradle.api.tasks.OutputDirectory
import org.gradle.api.tasks.SourceSet
import org.gradle.api.tasks.TaskAction
Expand Down Expand Up @@ -50,7 +51,8 @@ fun Project.runMetalavaWithArgs(

abstract class GenerateStubsTask : DefaultTask() {
/** Source files against which API signatures will be validated. */
lateinit var sourceSet: Object
@Nested
lateinit var sourceSet: Any

@get:InputFiles
lateinit var classPath: FileCollection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.InputFile;
import org.gradle.api.tasks.InputFiles;
import org.gradle.api.tasks.Nested;
import org.gradle.api.tasks.OutputFile;
import org.gradle.api.tasks.SourceSet;
import org.gradle.api.tasks.TaskAction;
Expand All @@ -46,6 +47,7 @@ public abstract class ApiInformationTask extends DefaultTask {
@InputFile
abstract File getApiTxt();

@Nested
abstract Object getSourceSet();

@InputFiles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.gradle.api.file.FileCollection;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.InputFiles;
import org.gradle.api.tasks.Nested;
import org.gradle.api.tasks.OutputFile;
import org.gradle.api.tasks.SourceSet;
import org.gradle.api.tasks.TaskAction;
Expand All @@ -35,32 +36,33 @@ public abstract class GenerateApiTxtFileTask extends DefaultTask {
@Input
abstract String getMetalavaJarPath();

public abstract void setMetalavaJarPath(String value);

@OutputFile
abstract File getApiTxt();

public abstract void setApiTxt(File value);

@Nested
abstract Object getSourceSet();

public abstract void setSourceSet(Object value);

@InputFiles
public abstract FileCollection getClassPath();

public abstract void setClassPath(FileCollection value);

@OutputFile
abstract File getBaselineFile();

public abstract void setBaselineFile(File value);

@Input
abstract boolean getUpdateBaseline();

public abstract void setSourceSet(Object value);

public abstract void setClassPath(FileCollection value);

public abstract void setBaselineFile(File value);

public abstract void setUpdateBaseline(boolean value);

public abstract void setMetalavaJarPath(String value);

public abstract void setApiTxt(File value);

private Set<File> getSourceDirs() {
if (getSourceSet() instanceof SourceSet) {
return ((SourceSet) getSourceSet()).getJava().getSrcDirs();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.gradle.testing.jacoco.tasks.JacocoReport;

public final class Coverage {

private Coverage() {}

public static void apply(FirebaseLibraryExtension firebaseLibrary) {
Expand Down Expand Up @@ -66,28 +67,31 @@ public static void apply(FirebaseLibraryExtension firebaseLibrary) {
.add("**Manifest*.*")
.build();

task.setClassDirectories(
project.files(
project.fileTree(
ImmutableMap.of(
"dir",
project.getBuildDir() + "/intermediates/javac/release",
"excludes",
excludes)),
task.getClassDirectories()
.setFrom(
project.files(
project.fileTree(
ImmutableMap.of(
"dir",
project.getBuildDir() + "/intermediates/javac/release",
"excludes",
excludes)),
project.fileTree(
ImmutableMap.of(
"dir",
project.getBuildDir() + "/tmp/kotlin-classes/release",
"excludes",
excludes))));
task.getSourceDirectories()
.setFrom(project.files("src/main/java", "src/main/kotlin"));
task.getExecutionData()
.setFrom(
project.fileTree(
ImmutableMap.of(
"dir",
project.getBuildDir() + "/tmp/kotlin-classes/release",
"excludes",
excludes))));
task.setSourceDirectories(project.files("src/main/java", "src/main/kotlin"));
task.setExecutionData(
project.fileTree(
ImmutableMap.of(
"dir",
project.getBuildDir(),
"includes",
ImmutableList.of("jacoco/*.exec"))));
project.getBuildDir(),
"includes",
ImmutableList.of("jacoco/*.exec"))));
task.reports(
reports -> {
reports
Expand Down
8 changes: 8 additions & 0 deletions firebase-annotations/api.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Signature format: 2.0
package com.google.firebase.annotations {

@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) public @interface PreviewApi {
}

}

4 changes: 2 additions & 2 deletions firebase-appdistribution-api/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ package com.google.firebase.appdistribution {
}

public interface UpdateProgress {
method @NonNull public long getApkBytesDownloaded();
method @NonNull public long getApkFileTotalBytes();
method public long getApkBytesDownloaded();
method public long getApkFileTotalBytes();
method @NonNull public com.google.firebase.appdistribution.UpdateStatus getUpdateStatus();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ dependencies {
testImplementation "com.google.truth:truth:$googleTruthVersion"
testImplementation 'androidx.test:core:1.2.0'
testImplementation 'org.mockito:mockito-inline:3.4.0'
testImplementation project(':firebase-appdistribution-api')
androidTestImplementation "org.mockito:mockito-android:3.4.0"
compileOnly 'com.google.auto.value:auto-value-annotations:1.6.5'
annotationProcessor 'com.google.auto.value:auto-value:1.6.5'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public interface UpdateProgress {
* @returns the number of bytes downloaded, or -1 if called when updating to an AAB or if no new
* release is available.
*/
@NonNull
long getApkBytesDownloaded();

/**
Expand All @@ -32,6 +33,7 @@ public interface UpdateProgress {
* @returns the file size in bytes, or -1 if called when updating to an AAB or if no new release
* is available.
*/
@NonNull
long getApkFileTotalBytes();

/** Returns the current {@link UpdateStatus} of the update. */
Expand Down
2 changes: 1 addition & 1 deletion firebase-dynamic-links/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ package com.google.firebase.dynamiclinks {
public abstract class FirebaseDynamicLinks {
ctor public FirebaseDynamicLinks();
method @NonNull public abstract com.google.firebase.dynamiclinks.DynamicLink.Builder createDynamicLink();
method @NonNull public abstract com.google.android.gms.tasks.Task<com.google.firebase.dynamiclinks.PendingDynamicLinkData> getDynamicLink(@NonNull android.content.Intent);
method @NonNull public abstract com.google.android.gms.tasks.Task<com.google.firebase.dynamiclinks.PendingDynamicLinkData> getDynamicLink(@Nullable android.content.Intent);
method @NonNull public abstract com.google.android.gms.tasks.Task<com.google.firebase.dynamiclinks.PendingDynamicLinkData> getDynamicLink(@NonNull android.net.Uri);
method @NonNull public static com.google.firebase.dynamiclinks.FirebaseDynamicLinks getInstance();
method @NonNull public static com.google.firebase.dynamiclinks.FirebaseDynamicLinks getInstance(@NonNull com.google.firebase.FirebaseApp);
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading