Skip to content

Commit d3e9f42

Browse files
ukaratkevichgstepniewski-google
authored andcommitted
Consolidate libraries versions
Introducing libs.toml and fixing build errors caused by versions changes.
1 parent 08914c3 commit d3e9f42

File tree

26 files changed

+158
-106
lines changed

26 files changed

+158
-106
lines changed

androidbrowserhelper/build.gradle

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -63,28 +63,28 @@ android {
6363

6464
dependencies {
6565
// Force newest versions of kotlin and coroutines to avoid duplicate classes in kotlin-stdlib
66-
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.22"))
67-
implementation(platform("org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.7.3"))
66+
implementation(platform(libs.kotlin.bom))
67+
implementation(platform(libs.kotlin.coroutines.bom))
6868

69-
api 'androidx.browser:browser:1.9.0-alpha04'
69+
api libs.androidx.browser
7070

7171
implementation fileTree(dir: 'libs', include: ['*.jar'])
7272

73-
implementation 'androidx.annotation:annotation:1.1.0'
74-
implementation 'androidx.core:core:1.0.2'
75-
implementation 'androidx.appcompat:appcompat:1.7.0'
76-
implementation 'com.google.guava:guava:33.4.8-android'
77-
78-
testImplementation 'junit:junit:4.12'
79-
testImplementation 'org.mockito:mockito-core:3.0.0'
80-
testImplementation 'org.robolectric:robolectric:4.12.2'
81-
82-
androidTestImplementation 'androidx.test:runner:1.2.0'
83-
androidTestImplementation 'androidx.test:rules:1.2.0'
84-
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
85-
androidTestImplementation 'org.mockito:mockito-core:3.0.0'
86-
androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:2.19.0'
87-
androidTestImplementation 'junit:junit:4.12'
73+
implementation libs.androidx.annotation
74+
implementation libs.androidx.core
75+
implementation libs.androidx.appcompat
76+
implementation libs.guava
77+
78+
testImplementation libs.junit
79+
testImplementation libs.mockito.core
80+
testImplementation libs.robolectric
81+
82+
androidTestImplementation libs.androidx.runner
83+
androidTestImplementation libs.androidx.rules
84+
androidTestImplementation libs.androidx.ext.junit
85+
androidTestImplementation libs.mockito.core
86+
androidTestImplementation libs.dexmaker.mockito
87+
androidTestImplementation libs.junit
8888
}
8989

9090
publishing {

androidbrowserhelper/src/test/java/com/google/androidbrowserhelper/trusted/ManageDataLauncherActivityTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import static org.junit.Assert.assertNotNull;
2121
import static org.junit.Assert.assertNull;
2222
import static org.junit.Assert.assertTrue;
23-
import static org.mockito.Matchers.eq;
23+
import static org.mockito.ArgumentMatchers.eq;
2424
import static org.mockito.Mockito.when;
2525
import static org.robolectric.Shadows.shadowOf;
2626

androidbrowserhelper/src/test/java/com/google/androidbrowserhelper/trusted/TwaProviderPickerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import static org.junit.Assert.assertEquals;
1818
import static org.junit.Assert.assertNull;
19-
import static org.mockito.Matchers.eq;
19+
import static org.mockito.ArgumentMatchers.eq;
2020
import static org.mockito.Mockito.when;
2121
import static org.robolectric.Shadows.shadowOf;
2222

demos/custom-tabs-auth-tab/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ android {
4242
dependencies {
4343
implementation project(path: ':androidbrowserhelper')
4444
implementation fileTree(dir: "libs", include: ["*.jar"])
45-
implementation 'androidx.appcompat:appcompat:1.7.0'
46-
implementation 'androidx.activity:activity:1.9.3'
47-
implementation 'androidx.browser:browser:1.9.0'
48-
implementation 'com.google.android.material:material:1.12.0'
49-
implementation 'androidx.annotation:annotation:1.9.1'
50-
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
45+
implementation libs.androidx.appcompat
46+
implementation libs.androidx.activity
47+
implementation libs.androidx.browser
48+
implementation libs.material
49+
implementation libs.androidx.annotation
50+
implementation libs.androidx.constraintlayout
5151
}

demos/custom-tabs-ephemeral-with-fallback/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ android {
4343
dependencies {
4444
implementation project(path: ':androidbrowserhelper')
4545
implementation fileTree(dir: "libs", include: ["*.jar"])
46-
implementation 'androidx.appcompat:appcompat:1.7.0'
47-
implementation 'androidx.activity:activity:1.9.3'
48-
implementation 'androidx.browser:browser:1.9.0-alpha01'
49-
implementation 'com.google.android.material:material:1.12.0'
50-
implementation 'androidx.annotation:annotation:1.9.1'
51-
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
46+
implementation libs.androidx.appcompat
47+
implementation libs.androidx.activity
48+
implementation libs.androidx.browser
49+
implementation libs.material
50+
implementation libs.androidx.annotation
51+
implementation libs.androidx.constraintlayout
5252
}

demos/custom-tabs-ephemeral-with-fallback/src/main/java/com/google/androidbrowserhelper/demos/customtabsephemeralwithfallback/MainActivity.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
import android.os.Bundle;
2525
import android.os.RemoteException;
2626
import android.widget.Button;
27+
2728
import androidx.annotation.NonNull;
28-
import androidx.annotation.OptIn;
2929
import androidx.browser.customtabs.CustomTabColorSchemeParams;
3030
import androidx.browser.customtabs.CustomTabsClient;
3131
import androidx.browser.customtabs.CustomTabsIntent;
3232
import androidx.browser.customtabs.CustomTabsServiceConnection;
3333
import androidx.browser.customtabs.CustomTabsSession;
34-
import androidx.browser.customtabs.ExperimentalEphemeralBrowsing;
34+
3535

3636
public class MainActivity extends Activity {
3737
private static final String URL = "https://xchrdw.github.io/browsing-data/siteDataTester.html";
@@ -51,7 +51,8 @@ public void onCustomTabsServiceConnected(@NonNull ComponentName name,
5151
}
5252

5353
@Override
54-
public void onServiceDisconnected(ComponentName componentName) { }
54+
public void onServiceDisconnected(ComponentName componentName) {
55+
}
5556
};
5657

5758
String packageName = CustomTabsClient.getPackageName(this, null);
@@ -87,7 +88,6 @@ protected void onStop() {
8788
mConnection = null;
8889
}
8990

90-
@OptIn(markerClass = ExperimentalEphemeralBrowsing.class)
9191
private void launchEphemeralTab() {
9292
CustomTabsIntent customTabsIntent = new CustomTabsIntent.Builder()
9393
.setEphemeralBrowsingEnabled(true)
@@ -106,7 +106,6 @@ private void launchFallbackWebView() {
106106
startActivity(webIntent);
107107
}
108108

109-
@OptIn(markerClass = ExperimentalEphemeralBrowsing.class)
110109
private boolean isEphemeralTabSupported() throws RemoteException {
111110
String provider = CustomTabsClient.getPackageName(this, null);
112111
if (provider == null) {

demos/custom-tabs-ephemeral/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ android {
4343
dependencies {
4444
implementation project(path: ':androidbrowserhelper')
4545
implementation fileTree(dir: "libs", include: ["*.jar"])
46-
implementation 'androidx.appcompat:appcompat:1.7.0'
47-
implementation 'androidx.activity:activity:1.9.3'
48-
implementation 'androidx.browser:browser:1.9.0-alpha01'
49-
implementation 'com.google.android.material:material:1.12.0'
50-
implementation 'androidx.annotation:annotation:1.9.1'
51-
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
46+
implementation libs.androidx.appcompat
47+
implementation libs.androidx.activity
48+
implementation libs.androidx.browser
49+
implementation libs.material
50+
implementation libs.androidx.annotation
51+
implementation libs.androidx.constraintlayout
5252
}

demos/custom-tabs-ephemeral/src/main/java/com/google/androidbrowserhelper/demos/customtabsephemeral/MainActivity.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import androidx.annotation.OptIn;
2020
import androidx.browser.customtabs.CustomTabsIntent;
21-
import androidx.browser.customtabs.ExperimentalEphemeralBrowsing;
2221

2322
import android.app.Activity;
2423
import android.content.Intent;
@@ -40,7 +39,6 @@ protected void onCreate(Bundle savedInstanceState) {
4039
});
4140
}
4241

43-
@OptIn(markerClass = ExperimentalEphemeralBrowsing.class)
4442
private void launchTab() {
4543
Intent customTabsIntent = new CustomTabsIntent.Builder()
4644
.setEphemeralBrowsingEnabled(true)

demos/custom-tabs-example-app/build.gradle

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ dependencies {
4444
implementation fileTree(dir: 'libs', include: ['*.jar'])
4545
implementation project(path: ':androidbrowserhelper')
4646

47-
implementation 'androidx.appcompat:appcompat:1.1.0'
48-
implementation 'androidx.browser:browser:1.6.0-alpha01'
49-
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
50-
implementation 'androidx.core:core:1.1.0'
51-
implementation 'androidx.recyclerview:recyclerview:1.1.0'
47+
implementation libs.androidx.appcompat
48+
implementation libs.androidx.browser
49+
implementation libs.androidx.constraintlayout
50+
implementation libs.androidx.core
51+
implementation libs.androidx.recyclerview
52+
implementation(platform(libs.kotlin.bom))
5253
}

demos/custom-tabs-headers/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ android {
4444

4545
dependencies {
4646
implementation fileTree(dir: "libs", include: ["*.jar"])
47-
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
48-
implementation 'androidx.browser:browser:1.4.0'
47+
implementation libs.androidx.constraintlayout
48+
implementation libs.androidx.browser
49+
implementation(platform(libs.kotlin.bom))
4950
}
50-

0 commit comments

Comments
 (0)