Skip to content

Commit

Permalink
Update our buildSrc maven api dependencies (#6445)
Browse files Browse the repository at this point in the history
Old dependencies use the outdated artifacts, from the outdated groups,
from a decade ago.
  • Loading branch information
rlazo authored Nov 11, 2024
1 parent f20340a commit 47bb909
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 24 deletions.
12 changes: 2 additions & 10 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,11 @@ dependencies {
annotationProcessor("com.google.auto.value:auto-value:1.6.5")
implementation(kotlin("gradle-plugin", "1.8.22"))
implementation(libs.org.json)
implementation(libs.bundles.maven.resolver)

implementation("org.eclipse.aether:aether-api:1.0.0.v20140518")
implementation("org.eclipse.aether:aether-util:1.0.0.v20140518")
implementation("com.google.guava:guava:31.1-jre")
implementation("org.ow2.asm:asm-tree:9.5")
implementation("org.eclipse.aether:aether-impl:1.0.0.v20140518")
implementation("org.eclipse.aether:aether-connector-basic:1.0.0.v20140518")
implementation("org.eclipse.aether:aether-transport-file:1.0.0.v20140518")
implementation("org.eclipse.aether:aether-transport-http:1.0.0.v20140518")
implementation("org.eclipse.aether:aether-transport-wagon:1.0.0.v20140518")
implementation("org.apache.maven:maven-aether-provider:3.3.9")

implementation("org.eclipse.jgit:org.eclipse.jgit:6.3.0.202209071007-r")

implementation(libs.kotlinx.serialization.json)
implementation("com.google.code.gson:gson:2.8.9")
implementation(libs.android.gradlePlugin.gradle)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import static java.util.stream.Collectors.toList;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Sets;
import com.google.firebase.gradle.bomgenerator.model.Dependency;
Expand Down Expand Up @@ -51,7 +50,7 @@

public abstract class BomGeneratorTask extends DefaultTask {
private static final List<String> BOM_ARTIFACTS =
ImmutableList.of(
List.of(
"com.google.firebase:firebase-analytics",
"com.google.firebase:firebase-analytics-ktx",
"com.google.firebase:firebase-appcheck-debug",
Expand Down Expand Up @@ -94,7 +93,7 @@ public abstract class BomGeneratorTask extends DefaultTask {
"com.google.firebase:firebase-storage-ktx",
"com.google.firebase:firebase-vertexai");
private static final List<String> IGNORED_ARTIFACTS =
ImmutableList.of(
List.of(
"crash-plugin",
"firebase-ml-vision",
"crashlytics",
Expand Down Expand Up @@ -175,7 +174,7 @@ public abstract class BomGeneratorTask extends DefaultTask {
"firebase-ml-natural-language-translate",
"firebase-ml-natural-language-translate-model");
private static final List<String> IMPORTANT_NON_FIREBASE_LIBRARIES =
ImmutableList.of(
List.of(
"com.google.android.gms:play-services-ads",
"com.google.gms:google-services",
"com.android.tools.build:gradle",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.firebase.gradle.plugins

import com.google.common.collect.ImmutableList
import com.google.firebase.gradle.plugins.LibraryType.JAVA
import com.google.firebase.gradle.plugins.semver.ApiDiffer
import com.google.firebase.gradle.plugins.semver.GmavenCopier
Expand Down Expand Up @@ -56,7 +55,7 @@ class FirebaseJavaLibraryPlugin : BaseFirebaseLibraryPlugin() {

// reduce the likelihood of kotlin module files colliding.
project.tasks.withType<KotlinCompile> {
kotlinOptions.freeCompilerArgs = ImmutableList.of("-module-name", kotlinModuleName(project))
kotlinOptions.freeCompilerArgs = listOf("-module-name", kotlinModuleName(project))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package com.google.firebase.gradle.plugins.ci;

import com.google.common.collect.ImmutableList;
import com.google.firebase.gradle.plugins.FirebaseLibraryExtension;
import java.util.List;
import java.util.Set;
Expand Down Expand Up @@ -124,7 +123,7 @@ private static void setupChangedTask(
}

private static final List<String> ANDROID_PLUGINS =
ImmutableList.of("com.android.application", "com.android.library", "com.android.test");
List.of("com.android.application", "com.android.library", "com.android.test");

private static boolean isAndroidProject(Project project) {
return ANDROID_PLUGINS.stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
package com.google.firebase.gradle.plugins.ci;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.firebase.gradle.plugins.FirebaseLibraryExtension;
import java.io.File;
import java.util.List;
import java.util.Map;
import org.gradle.api.Project;
import org.gradle.api.tasks.testing.Test;
import org.gradle.testing.jacoco.plugins.JacocoPluginExtension;
Expand All @@ -32,7 +32,7 @@ private Coverage() {}

public static void apply(FirebaseLibraryExtension firebaseLibrary) {
Project project = firebaseLibrary.getProject();
project.apply(ImmutableMap.of("plugin", "jacoco"));
project.apply(Map.of("plugin", "jacoco"));
File reportsDir = new File(project.getBuildDir(), "/reports/jacoco");
JacocoPluginExtension jacoco = project.getExtensions().getByType(JacocoPluginExtension.class);

Expand All @@ -45,7 +45,7 @@ public static void apply(FirebaseLibraryExtension firebaseLibrary) {
test -> {
JacocoTaskExtension testJacoco =
test.getExtensions().getByType(JacocoTaskExtension.class);
testJacoco.setExcludeClassLoaders(ImmutableList.of("jdk.internal.*"));
testJacoco.setExcludeClassLoaders(List.of("jdk.internal.*"));
testJacoco.setIncludeNoLocationClasses(true);
});

Expand All @@ -72,13 +72,13 @@ public static void apply(FirebaseLibraryExtension firebaseLibrary) {
.setFrom(
project.files(
project.fileTree(
ImmutableMap.of(
Map.of(
"dir",
project.getBuildDir() + "/intermediates/javac/release",
"excludes",
excludes)),
project.fileTree(
ImmutableMap.of(
Map.of(
"dir",
project.getBuildDir() + "/tmp/kotlin-classes/release",
"excludes",
Expand All @@ -88,7 +88,7 @@ public static void apply(FirebaseLibraryExtension firebaseLibrary) {
task.getExecutionData()
.setFrom(
project.fileTree(
ImmutableMap.of(
Map.of(
"dir",
project.getBuildDir(),
"includes",
Expand Down
18 changes: 18 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ grpc = "1.62.2"
grpcKotlin = "1.4.1"
javalite = "3.25.5"
kotlin = "1.8.22"
mavenResolverApi = "1.9.22"
mavenResolverProvider = "3.9.9"
mockk = "1.13.11"
serialization-plugin = "1.8.22"
protoc = "3.25.5"
Expand Down Expand Up @@ -61,6 +63,13 @@ kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version
kotlinx-serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "serialization" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
maven-resolver-api = { module = "org.apache.maven.resolver:maven-resolver-api", version.ref = "mavenResolverApi" }
maven-resolver-connector-basic = { module = "org.apache.maven.resolver:maven-resolver-connector-basic", version.ref = "mavenResolverApi" }
maven-resolver-impl = { module = "org.apache.maven.resolver:maven-resolver-impl", version.ref = "mavenResolverApi" }
maven-resolver-provider = { module = "org.apache.maven:maven-resolver-provider", version.ref = "mavenResolverProvider" }
maven-resolver-transport-file = { module = "org.apache.maven.resolver:maven-resolver-transport-file", version.ref = "mavenResolverApi" }
maven-resolver-transport-http = { module = "org.apache.maven.resolver:maven-resolver-transport-http", version.ref = "mavenResolverApi" }
maven-resolver-util = { module = "org.apache.maven.resolver:maven-resolver-util", version.ref = "mavenResolverApi" }
okhttp = { module = "com.squareup.okhttp3:okhttp", version = "3.12.13" }
org-json = { module = "org.json:json", version = "20210307" }
playservices-base = { module = "com.google.android.gms:play-services-base", version = "18.1.0" }
Expand Down Expand Up @@ -104,6 +113,15 @@ testonly-three-ten-abp = { module = "com.jakewharton.threetenabp:threetenabp", v
[bundles]
kotest = ["kotest-runner", "kotest-assertions", "kotest-property", "kotest-property-arbs"]
playservices = ["playservices-base", "playservices-basement", "playservices-tasks"]
maven-resolver = [
"maven-resolver-api",
"maven-resolver-connector-basic",
"maven-resolver-impl",
"maven-resolver-provider",
"maven-resolver-transport-file",
"maven-resolver-transport-http",
"maven-resolver-util"
]

[plugins]
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
Expand Down

0 comments on commit 47bb909

Please sign in to comment.