diff --git a/app/build.gradle b/app/build.gradle index 576a3aa1ec..eef1b7d5c3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -41,9 +41,6 @@ repositories { } jcenter { content { - includeVersion "com.google.android.exoplayer", "exoplayer-core", "2.9.1" - includeVersion "com.google.android.exoplayer", "exoplayer-ui", "2.9.1" - includeVersion "com.google.android.exoplayer", "extension-mediasession", "2.9.1" includeVersion "mobi.upod", "time-duration-picker", "1.1.3" includeVersion "cn.carbswang.android", "NumberPickerView", "1.0.9" includeVersion "com.takisoft.fix", "colorpicker", "0.9.1" @@ -397,58 +394,56 @@ android { } dependencies { - implementation 'androidx.core:core-ktx:1.5.0' - implementation 'androidx.fragment:fragment-ktx:1.3.5' + implementation libs.androidx.core.ktx + implementation libs.androidx.fragment.ktx lintChecks project(':lintchecks') - coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' + coreLibraryDesugaring libs.android.tools.desugar - implementation ('androidx.appcompat:appcompat:1.2.0') { + implementation (libs.androidx.appcompat) { version { strictly '1.2.0' } } - implementation "androidx.window:window:1.0.0-alpha09" - implementation 'androidx.recyclerview:recyclerview:1.1.0' - implementation 'com.google.android.material:material:1.3.0' - implementation 'androidx.legacy:legacy-support-v13:1.0.0' - implementation 'androidx.cardview:cardview:1.0.0' - implementation 'androidx.preference:preference:1.0.0' - implementation 'androidx.legacy:legacy-preference-v14:1.0.0' - implementation 'androidx.gridlayout:gridlayout:1.0.0' - implementation 'androidx.exifinterface:exifinterface:1.0.0' - implementation 'androidx.constraintlayout:constraintlayout:2.0.4' - implementation 'androidx.multidex:multidex:2.0.1' - implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5' - implementation 'androidx.navigation:navigation-ui-ktx:2.3.5' - implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' - implementation 'androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1' - implementation 'androidx.lifecycle:lifecycle-common-java8:2.3.1' - implementation 'androidx.lifecycle:lifecycle-reactivestreams-ktx:2.3.1' - implementation "androidx.camera:camera-core:1.0.0-beta11" - implementation "androidx.camera:camera-camera2:1.0.0-beta11" - implementation "androidx.camera:camera-lifecycle:1.0.0-beta11" - implementation "androidx.camera:camera-view:1.0.0-alpha18" - implementation "androidx.concurrent:concurrent-futures:1.0.0" - implementation "androidx.autofill:autofill:1.0.0" - implementation "androidx.biometric:biometric:1.1.0" - implementation "androidx.sharetarget:sharetarget:1.1.0" + implementation libs.androidx.window + implementation libs.androidx.recyclerview + implementation libs.material.material + implementation libs.androidx.legacy.support + implementation libs.androidx.cardview + implementation libs.androidx.preference + implementation libs.androidx.legacy.preference + implementation libs.androidx.gridlayout + implementation libs.androidx.exifinterface + implementation libs.androidx.constraintlayout + implementation libs.androidx.multidex + implementation libs.androidx.navigation.fragment.ktx + implementation libs.androidx.navigation.ui.ktx + implementation libs.androidx.lifecycle.extensions + implementation libs.androidx.lifecycle.viewmodel.savedstate + implementation libs.androidx.lifecycle.common.java8 + implementation libs.androidx.lifecycle.reactivestreams.ktx + implementation libs.androidx.camera.core + implementation libs.androidx.camera.camera2 + implementation libs.androidx.camera.lifecycle + implementation libs.androidx.camera.view + implementation libs.androidx.concurrent.futures + implementation libs.androidx.autofill + implementation libs.androidx.biometric + implementation libs.androidx.sharetarget - implementation ('com.google.firebase:firebase-messaging:22.0.0') { + implementation (libs.firebase.messaging) { exclude group: 'com.google.firebase', module: 'firebase-core' exclude group: 'com.google.firebase', module: 'firebase-analytics' exclude group: 'com.google.firebase', module: 'firebase-measurement-connector' } - implementation 'com.google.android.gms:play-services-maps:16.1.0' - implementation 'com.google.android.gms:play-services-auth:16.0.1' + implementation libs.google.play.services.maps + implementation libs.google.play.services.auth - implementation 'com.google.android.exoplayer:exoplayer-core:2.15.0' - implementation 'com.google.android.exoplayer:exoplayer-ui:2.15.0' - implementation 'com.google.android.exoplayer:extension-mediasession:2.15.0' + implementation libs.bundles.exoplayer - implementation 'org.conscrypt:conscrypt-android:2.0.0' - implementation 'org.signal:aesgcmprovider:0.0.3' + implementation libs.conscrypt.android + implementation libs.signal.aesgcmprovider implementation project(':libsignal-service') implementation project(':paging') @@ -457,96 +452,100 @@ dependencies { implementation project(':device-transfer') implementation project(':image-editor') - implementation 'org.signal:zkgroup-android:0.7.0' - implementation "org.whispersystems:signal-client-android:${LIBSIGNAL_CLIENT_VERSION}" - implementation 'com.google.protobuf:protobuf-javalite:3.10.0' + implementation libs.signal.zkgroup.android + implementation libs.signal.client.android + implementation libs.google.protobuf.javalite - implementation('com.mobilecoin:android-sdk:1.1.0') { + implementation(libs.mobilecoin) { exclude group: 'com.google.protobuf' } - implementation 'org.signal:argon2:13.1@aar' + implementation(libs.signal.argon2) { + artifact { + type = "aar" + } + } - implementation 'org.signal:ringrtc-android:2.13.0' + implementation libs.signal.ringrtc - implementation "me.leolin:ShortcutBadger:1.1.22" - implementation 'se.emilsjolander:stickylistheaders:2.7.0' - implementation 'com.jpardogo.materialtabstrip:library:1.0.9' - implementation 'org.apache.httpcomponents:httpclient-android:4.3.5' - implementation 'com.github.chrisbanes:PhotoView:2.3.0' - implementation 'com.github.bumptech.glide:glide:4.11.0' - kapt 'com.github.bumptech.glide:compiler:4.11.0' - kapt 'androidx.annotation:annotation:1.1.0' - implementation 'com.makeramen:roundedimageview:2.1.0' - implementation 'com.pnikosis:materialish-progress:1.5' - implementation 'org.greenrobot:eventbus:3.0.0' - implementation 'pl.tajchert:waitingdots:0.1.0' - implementation 'com.melnykov:floatingactionbutton:1.3.0' - implementation 'com.google.zxing:android-integration:3.1.0' - implementation 'mobi.upod:time-duration-picker:1.1.3' - implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1' - implementation 'com.google.zxing:core:3.2.1' - implementation ('com.davemorrissey.labs:subsampling-scale-image-view:3.10.0') { + implementation libs.leolin.shortcutbadger + implementation libs.emilsjolander.stickylistheaders + implementation libs.jpardogo.materialtabstrip + implementation libs.apache.httpclient.android + implementation libs.photoview + implementation libs.glide.glide + kapt libs.glide.compiler + kapt libs.androidx.annotation + implementation libs.roundedimageview + implementation libs.materialish.progress + implementation libs.greenrobot.eventbus + implementation libs.waitingdots + implementation libs.floatingactionbutton + implementation libs.google.zxing.android.integration + implementation libs.time.duration.picker + implementation libs.textdrawable + implementation libs.google.zxing.core + implementation (libs.subsampling.scale.image.view) { exclude group: 'com.android.support', module: 'support-annotations' } - implementation ('cn.carbswang.android:NumberPickerView:1.0.9') { + implementation (libs.numberpickerview) { exclude group: 'com.android.support', module: 'appcompat-v7' } - implementation ('com.tomergoldst.android:tooltips:1.0.6') { + implementation (libs.android.tooltips) { exclude group: 'com.android.support', module: 'appcompat-v7' } - implementation ('com.klinkerapps:android-smsmms:4.0.1') { + implementation (libs.android.smsmms) { exclude group: 'com.squareup.okhttp', module: 'okhttp' exclude group: 'com.squareup.okhttp', module: 'okhttp-urlconnection' } - implementation 'com.annimon:stream:1.1.8' - implementation ('com.takisoft.fix:colorpicker:0.9.1') { + implementation libs.stream + implementation (libs.colorpicker) { exclude group: 'com.android.support', module: 'appcompat-v7' exclude group: 'com.android.support', module: 'recyclerview-v7' } - implementation 'com.airbnb.android:lottie:3.6.0' + implementation libs.lottie - implementation 'com.codewaves.stickyheadergrid:stickyheadergrid:0.9.4' - implementation 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3-S2' + implementation libs.stickyheadergrid + implementation libs.circular.progress.button - implementation 'org.signal:android-database-sqlcipher:4.4.3-S3' - implementation "androidx.sqlite:sqlite:2.1.0" + implementation libs.signal.android.database.sqlcipher + implementation libs.androidx.sqlite - implementation ('com.googlecode.ez-vcard:ez-vcard:0.9.11') { + implementation (libs.google.ez.vcard) { exclude group: 'com.fasterxml.jackson.core' exclude group: 'org.freemarker' } - implementation 'dnsjava:dnsjava:2.1.9' + implementation libs.dnsjava - flipperImplementation 'com.facebook.flipper:flipper:0.91.0' - flipperImplementation 'com.facebook.soloader:soloader:0.10.1' + flipperImplementation libs.facebook.flipper + flipperImplementation libs.facebook.soloader - testImplementation 'junit:junit:4.12' - testImplementation 'org.assertj:assertj-core:3.11.1' - testImplementation 'org.mockito:mockito-core:2.23.4' - testImplementation 'org.powermock:powermock-api-mockito2:2.0.9' - testImplementation 'org.powermock:powermock-module-junit4:2.0.9' - testImplementation 'org.powermock:powermock-module-junit4-rule:2.0.9' - testImplementation 'org.powermock:powermock-classloading-xstream:2.0.9' + testImplementation testLibs.junit.junit + testImplementation testLibs.assertj.core + testImplementation testLibs.mockito.core + testImplementation testLibs.powermock.api.mockito + testImplementation testLibs.powermock.module.junit4.core + testImplementation testLibs.powermock.module.junit4.rule + testImplementation testLibs.powermock.classloading.xstream - testImplementation 'androidx.test:core:1.2.0' - testImplementation ('org.robolectric:robolectric:4.4') { + testImplementation testLibs.androidx.test.core + testImplementation (testLibs.robolectric.robolectric) { exclude group: 'com.google.protobuf', module: 'protobuf-java' } - testImplementation 'org.robolectric:shadows-multidex:4.4' - testImplementation 'org.hamcrest:hamcrest:2.2' + testImplementation testLibs.robolectric.shadows.multidex + testImplementation testLibs.hamcrest.hamcrest testImplementation(testFixtures(project(":libsignal-service"))) - androidTestImplementation 'androidx.test.ext:junit:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + androidTestImplementation testLibs.androidx.test.ext.junit + androidTestImplementation testLibs.espresso.core - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.12.0" + implementation libs.kotlin.stdlib.jdk7 + implementation libs.jackson.module.kotlin - implementation 'io.reactivex.rxjava3:rxandroid:3.0.0' - implementation 'io.reactivex.rxjava3:rxkotlin:3.0.1' + implementation libs.rxjava3.rxandroid + implementation libs.rxjava3.rxkotlin } dependencyVerification { diff --git a/app/witness-verifications.gradle b/app/witness-verifications.gradle index e998117bb4..a8e591e21f 100644 --- a/app/witness-verifications.gradle +++ b/app/witness-verifications.gradle @@ -579,9 +579,6 @@ dependencyVerification { ['org.signal:ringrtc-android:2.13.0', '8e03e651969cb9dc7a78f449e8aace3203ed17e23770a32591af1df9ad7d0c69'], - ['org.signal:zkgroup-android:0.7.0', - '52b172565bd01526e93ebf1796b834bdc449d4fe3422c1b827e49cb8d4f13fbd'], - ['org.signal:zkgroup-java:0.7.0', 'd0099eedd60d6f7d4df5b288175e5d585228ed8897789926bdab69bf8c05659f'], @@ -591,9 +588,6 @@ dependencyVerification { ['org.threeten:threetenbp:1.3.6', 'f4c23ffaaed717c3b99c003e0ee02d6d66377fd47d866fec7d971bd8644fc1a7'], - ['org.whispersystems:signal-client-android:0.9.4', - '5b4d8e0b37701caefe6089bdf09667716fea5829f105373e4bfce3041e7c6387'], - ['org.whispersystems:signal-client-java:0.9.4', '629fb84dbbf5663cbfda0cb87420b0f64ad9902088c575478b04009cce9cbf8a'], diff --git a/core-util/build.gradle b/core-util/build.gradle index 64a7e0c7bf..94bb4e3195 100644 --- a/core-util/build.gradle +++ b/core-util/build.gradle @@ -42,12 +42,12 @@ protobuf { dependencies { lintChecks project(':lintchecks') - coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' + coreLibraryDesugaring libs.android.tools.desugar - api 'androidx.annotation:annotation:1.1.0' + api libs.androidx.annotation - implementation 'com.google.protobuf:protobuf-javalite:3.10.0' + implementation libs.google.protobuf.javalite - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:2.23.4' + testImplementation testLibs.junit.junit + testImplementation testLibs.mockito.core } diff --git a/core-util/witness-verifications.gradle b/core-util/witness-verifications.gradle index f1e6112ec6..91d6a56ed4 100644 --- a/core-util/witness-verifications.gradle +++ b/core-util/witness-verifications.gradle @@ -3,8 +3,8 @@ dependencyVerification { verify = [ - ['androidx.annotation:annotation:1.1.0', - 'd38d63edb30f1467818d50aaf05f8a692dea8b31392a049bfa991b159ad5b692'], + ['androidx.annotation:annotation:1.2.0', + '9029262bddce116e6d02be499e4afdba21f24c239087b76b3b57d7e98b490a36'], ['com.google.protobuf:protobuf-javalite:3.10.0', '215a94dbe100130295906b531bb72a26965c7ac8fcd9a75bf8054a8ac2abf4b4'], diff --git a/dependencies.gradle b/dependencies.gradle new file mode 100644 index 0000000000..d7a92f8326 --- /dev/null +++ b/dependencies.gradle @@ -0,0 +1,152 @@ +dependencyResolutionManagement { + versionCatalogs { + libs { + version('signal-client', '0.9.4') + version('zkgroup', '0.7.0') + version('exoplayer', '2.15.0') + version('androidx-camera', '1.0.0-beta11') + version('androidx-lifecycle', '2.3.1') + version('mp4parser', '1.9.39') + + // Desugaring + alias('android-tools-desugar').to('com.android.tools:desugar_jdk_libs:1.1.5') + + // Kotlin + alias('kotlin-stdlib-jdk7').to('org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.32') + + // Android X + alias('androidx-core-ktx').to('androidx.core:core-ktx:1.5.0') + alias('androidx-fragment-ktx').to('androidx.fragment:fragment-ktx:1.3.5') + alias('androidx-annotation').to('androidx.annotation:annotation:1.2.0') + alias('androidx-appcompat').to('androidx.appcompat:appcompat:1.2.0') + alias('androidx-constraintlayout').to('androidx.constraintlayout:constraintlayout:2.0.4') + alias('androidx-window').to('androidx.window:window:1.0.0-alpha09') + alias('androidx-recyclerview').to('androidx.recyclerview:recyclerview:1.1.0') + alias('androidx-legacy-support').to('androidx.legacy:legacy-support-v13:1.0.0') + alias('androidx-legacy-preference').to('androidx.legacy:legacy-preference-v14:1.0.0') + alias('androidx-cardview').to('androidx.cardview:cardview:1.0.0') + alias('androidx-preference').to('androidx.preference:preference:1.0.0') + alias('androidx-gridlayout').to('androidx.gridlayout:gridlayout:1.0.0') + alias('androidx-exifinterface').to('androidx.exifinterface:exifinterface:1.0.0') + alias('androidx-multidex').to('androidx.multidex:multidex:2.0.1') + alias('androidx-navigation-fragment-ktx').to('androidx.navigation:navigation-fragment-ktx:2.3.5') + alias('androidx-navigation-ui-ktx').to('androidx.navigation:navigation-ui-ktx:2.3.5') + alias('androidx-lifecycle-extensions').to('androidx.lifecycle:lifecycle-extensions:2.2.0') + alias('androidx-lifecycle-viewmodel-savedstate').to('androidx.lifecycle', 'lifecycle-viewmodel-savedstate').versionRef('androidx-lifecycle') + alias('androidx-lifecycle-common-java8').to('androidx.lifecycle', 'lifecycle-common-java8').versionRef('androidx-lifecycle') + alias('androidx-lifecycle-reactivestreams-ktx').to('androidx.lifecycle', 'lifecycle-reactivestreams-ktx').versionRef('androidx-lifecycle') + alias('androidx-camera-core').to('androidx.camera', 'camera-core').versionRef('androidx-camera') + alias('androidx-camera-camera2').to('androidx.camera', 'camera-camera2').versionRef('androidx-camera') + alias('androidx-camera-lifecycle').to('androidx.camera', 'camera-lifecycle').versionRef('androidx-camera') + alias('androidx-camera-view').to('androidx.camera:camera-view:1.0.0-alpha18') + alias('androidx-concurrent-futures').to('androidx.concurrent:concurrent-futures:1.0.0') + alias('androidx-autofill').to('androidx.autofill:autofill:1.0.0') + alias('androidx-biometric').to('androidx.biometric:biometric:1.1.0') + alias('androidx-sharetarget').to('androidx.sharetarget:sharetarget:1.1.0') + alias('androidx-sqlite').to('androidx.sqlite:sqlite:2.1.0') + + // Material + alias('material-material').to('com.google.android.material:material:1.3.0') + + // Google + alias('google-protobuf-javalite').to('com.google.protobuf:protobuf-javalite:3.10.0') + alias('google-libphonenumber').to('com.googlecode.libphonenumber:libphonenumber:8.12.17') + alias('google-play-services-maps').to('com.google.android.gms:play-services-maps:16.1.0') + alias('google-play-services-auth').to('com.google.android.gms:play-services-auth:16.0.1') + alias('google-zxing-android-integration').to('com.google.zxing:android-integration:3.1.0') + alias('google-zxing-core').to('com.google.zxing:core:3.2.1') + alias('google-ez-vcard').to('com.googlecode.ez-vcard:ez-vcard:0.9.11') + + // Exoplayer + alias('exoplayer-core').to('com.google.android.exoplayer', 'exoplayer-core').versionRef('exoplayer') + alias('exoplayer-ui').to('com.google.android.exoplayer', 'exoplayer-ui').versionRef('exoplayer') + alias('exoplayer-extension-mediasession').to('com.google.android.exoplayer', 'extension-mediasession').versionRef('exoplayer') + bundle('exoplayer', ['exoplayer-core', 'exoplayer-ui', 'exoplayer-extension-mediasession']) + + // Firebase + alias('firebase-messaging').to('com.google.firebase:firebase-messaging:22.0.0') + + // 1st Party + alias('signal-client-java').to('org.whispersystems', 'signal-client-java').versionRef('signal-client') + alias('signal-client-android').to('org.whispersystems', 'signal-client-android').versionRef('signal-client') + alias('signal-zkgroup-java').to('org.signal', 'zkgroup-java').versionRef('zkgroup') + alias('signal-zkgroup-android').to('org.signal', 'zkgroup-android').versionRef('zkgroup') + alias('signal-aesgcmprovider').to('org.signal:aesgcmprovider:0.0.3') + alias('signal-argon2').to('org.signal:argon2:13.1') + alias('signal-ringrtc').to('org.signal:ringrtc-android:2.13.0') + alias('signal-android-database-sqlcipher').to('org.signal:android-database-sqlcipher:4.4.3-S3') + + // Third Party + alias('greenrobot-eventbus').to('org.greenrobot:eventbus:3.0.0') + alias('jackson-core').to('com.fasterxml.jackson.core:jackson-databind:2.9.9.2') + alias('jackson-module-kotlin').to('com.fasterxml.jackson.module:jackson-module-kotlin:2.12.0') + alias('square-okhttp3').to('com.squareup.okhttp3:okhttp:3.12.10') + alias('threeten-threetenbp').to('org.threeten:threetenbp:1.3.6') + alias('rxjava3-rxjava').to('io.reactivex.rxjava3:rxjava:3.0.13') + alias('rxjava3-rxandroid').to('io.reactivex.rxjava3:rxandroid:3.0.0') + alias('rxjava3-rxkotlin').to('io.reactivex.rxjava3:rxkotlin:3.0.1') + alias('conscrypt-android').to('org.conscrypt:conscrypt-android:2.0.0') + alias('mobilecoin').to('com.mobilecoin:android-sdk:1.1.0') + alias('leolin-shortcutbadger').to('me.leolin:ShortcutBadger:1.1.22') + alias('emilsjolander-stickylistheaders').to('se.emilsjolander:stickylistheaders:2.7.0') + alias('jpardogo-materialtabstrip').to('com.jpardogo.materialtabstrip:library:1.0.9') + alias('apache-httpclient-android').to('org.apache.httpcomponents:httpclient-android:4.3.5') + alias('glide-glide').to('com.github.bumptech.glide:glide:4.11.0') + alias('glide-compiler').to('com.github.bumptech.glide:compiler:4.11.0') + alias('photoview').to('com.github.chrisbanes:PhotoView:2.3.0') + alias('roundedimageview').to('com.makeramen:roundedimageview:2.1.0') + alias('materialish-progress').to('com.pnikosis:materialish-progress:1.5') + alias('waitingdots').to('pl.tajchert:waitingdots:0.1.0') + alias('floatingactionbutton').to('com.melnykov:floatingactionbutton:1.3.0') + alias('time-duration-picker').to('mobi.upod:time-duration-picker:1.1.3') + alias('textdrawable').to('com.amulyakhare:com.amulyakhare.textdrawable:1.0.1') + alias('subsampling-scale-image-view').to('com.davemorrissey.labs:subsampling-scale-image-view:3.10.0') + alias('numberpickerview').to('cn.carbswang.android:NumberPickerView:1.0.9') + alias('android-tooltips').to('com.tomergoldst.android:tooltips:1.0.6') + alias('android-smsmms').to('com.klinkerapps:android-smsmms:4.0.1') + alias('stream').to('com.annimon:stream:1.1.8') + alias('colorpicker').to('com.takisoft.fix:colorpicker:0.9.1') + alias('lottie').to('com.airbnb.android:lottie:3.6.0') + alias('stickyheadergrid').to('com.codewaves.stickyheadergrid:stickyheadergrid:0.9.4') + alias('circular-progress-button').to('com.github.dmytrodanylyk.circular-progress-button:library:1.1.3-S2') + alias('dnsjava').to('dnsjava:dnsjava:2.1.9') + alias('facebook-flipper').to('com.facebook.flipper:flipper:0.91.0') + alias('facebook-soloader').to('com.facebook.soloader:soloader:0.10.1') + + // Mp4Parser + alias('mp4parser-isoparser').to('org.mp4parser', 'isoparser').versionRef('mp4parser') + alias('mp4parser-streaming').to('org.mp4parser', 'streaming').versionRef('mp4parser') + alias('mp4parser-muxer').to('org.mp4parser', 'muxer').versionRef('mp4parser') + bundle('mp4parser', ['mp4parser-isoparser', 'mp4parser-streaming', 'mp4parser-muxer']) + } + + testLibs { + version('robolectric', '4.4') + version('powermock', '2.0.9') + + alias('junit-junit').to('junit:junit:4.13.2') + alias('androidx-test-core').to('androidx.test:core:1.2.0') + alias('androidx-test-ext-junit').to('androidx.test.ext:junit:1.1.1') + alias('espresso-core').to('androidx.test.espresso:espresso-core:3.2.0') + alias('mockito-core').to('org.mockito:mockito-core:2.23.4') + alias('robolectric-robolectric').to('org.robolectric', 'robolectric').versionRef('robolectric') + alias('robolectric-shadows-multidex').to('org.robolectric', 'shadows-multidex').versionRef('robolectric') + alias('hamcrest-hamcrest').to('org.hamcrest:hamcrest:2.2') + alias('assertj-core').to('org.assertj:assertj-core:3.11.1') + alias('powermock-api-mockito').to('org.powermock', 'powermock-api-mockito2').versionRef('powermock') + alias('powermock-module-junit4-core').to('org.powermock', 'powermock-module-junit4').versionRef('powermock') + alias('powermock-module-junit4-rule').to('org.powermock', 'powermock-module-junit4-rule').versionRef('powermock') + alias('powermock-classloading-xstream').to('org.powermock', 'powermock-classloading-xstream').versionRef('powermock') + + alias('conscrypt-openjdk-uber').to('org.conscrypt:conscrypt-openjdk-uber:2.0.0') + } + + lintLibs { + version('lint', '26.6.3') + + alias('lint-api').to('com.android.tools.lint', 'lint-api').versionRef('lint') + alias('lint-checks').to('com.android.tools.lint', 'lint-checks').versionRef('lint') + alias('lint-tests').to('com.android.tools.lint', 'lint-tests').versionRef('lint') + } + } +} \ No newline at end of file diff --git a/device-transfer/app/build.gradle b/device-transfer/app/build.gradle index b2f6d3e77f..93f3d10f6e 100644 --- a/device-transfer/app/build.gradle +++ b/device-transfer/app/build.gradle @@ -39,11 +39,11 @@ android { } dependencies { - implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'com.google.android.material:material:1.2.1' - implementation 'androidx.constraintlayout:constraintlayout:2.0.4' + implementation libs.androidx.appcompat + implementation libs.material.material + implementation libs.androidx.constraintlayout - testImplementation 'junit:junit:4.12' + testImplementation testLibs.junit.junit implementation project(':device-transfer') } diff --git a/device-transfer/lib/build.gradle b/device-transfer/lib/build.gradle index cd59a8352d..0071405c7b 100644 --- a/device-transfer/lib/build.gradle +++ b/device-transfer/lib/build.gradle @@ -26,18 +26,18 @@ dependencyVerification { } dependencies { - implementation 'androidx.appcompat:appcompat:1.2.0' + implementation libs.androidx.appcompat implementation project(':core-util') - implementation "org.whispersystems:signal-client-java:${LIBSIGNAL_CLIENT_VERSION}" - api 'org.greenrobot:eventbus:3.0.0' + implementation libs.signal.client.java + api libs.greenrobot.eventbus - testImplementation 'junit:junit:4.12' - testImplementation 'androidx.test:core:1.2.0' - testImplementation ('org.robolectric:robolectric:4.4') { + testImplementation testLibs.junit.junit + testImplementation testLibs.androidx.test.core + testImplementation (testLibs.robolectric.robolectric) { exclude group: 'com.google.protobuf', module: 'protobuf-java' } - testImplementation 'org.robolectric:shadows-multidex:4.4' - testImplementation 'org.hamcrest:hamcrest:2.2' + testImplementation testLibs.robolectric.shadows.multidex + testImplementation testLibs.hamcrest.hamcrest testImplementation(testFixtures(project(":libsignal-service"))) } diff --git a/device-transfer/lib/witness-verifications.gradle b/device-transfer/lib/witness-verifications.gradle index 0373ac999c..9dca5a7b2a 100644 --- a/device-transfer/lib/witness-verifications.gradle +++ b/device-transfer/lib/witness-verifications.gradle @@ -6,8 +6,8 @@ dependencyVerification { ['androidx.activity:activity:1.0.0', 'd1bc9842455c2e534415d88c44df4d52413b478db9093a1ba36324f705f44c3d'], - ['androidx.annotation:annotation:1.1.0', - 'd38d63edb30f1467818d50aaf05f8a692dea8b31392a049bfa991b159ad5b692'], + ['androidx.annotation:annotation:1.2.0', + '9029262bddce116e6d02be499e4afdba21f24c239087b76b3b57d7e98b490a36'], ['androidx.appcompat:appcompat-resources:1.2.0', 'c470297c03ff3de1c3d15dacf0be0cae63abc10b52f021dd07ae28daa3100fe5'], diff --git a/image-editor/lib/build.gradle b/image-editor/lib/build.gradle index 0f1dfe7402..7a3556ef58 100644 --- a/image-editor/lib/build.gradle +++ b/image-editor/lib/build.gradle @@ -37,11 +37,11 @@ dependencies { implementation project(':core-util') - coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' + coreLibraryDesugaring libs.android.tools.desugar - implementation 'androidx.core:core-ktx:1.5.0' - implementation 'androidx.annotation:annotation:1.2.0' - implementation 'androidx.appcompat:appcompat:1.2.0' + implementation libs.androidx.core.ktx + implementation libs.androidx.annotation + implementation libs.androidx.appcompat - kapt 'androidx.annotation:annotation:1.2.0' + kapt libs.androidx.annotation } \ No newline at end of file diff --git a/libsignal/service/build.gradle b/libsignal/service/build.gradle index d0fbe53e96..16f5fbec67 100644 --- a/libsignal/service/build.gradle +++ b/libsignal/service/build.gradle @@ -32,24 +32,24 @@ configurations { } dependencies { - implementation 'com.google.protobuf:protobuf-javalite:3.10.0' - api 'com.googlecode.libphonenumber:libphonenumber:8.12.17' - api 'com.fasterxml.jackson.core:jackson-databind:2.9.9.2' + implementation libs.google.protobuf.javalite + api libs.google.libphonenumber + api libs.jackson.core - implementation "org.whispersystems:signal-client-java:${LIBSIGNAL_CLIENT_VERSION}" - api 'com.squareup.okhttp3:okhttp:3.12.10' - implementation 'org.threeten:threetenbp:1.3.6' + implementation libs.signal.client.java + api libs.square.okhttp3 + implementation libs.threeten.threetenbp - api 'io.reactivex.rxjava3:rxjava:3.0.13' + api libs.rxjava3.rxjava - api 'org.signal:zkgroup-java:0.7.0' + api libs.signal.zkgroup.java - testImplementation 'junit:junit:4.12' - testImplementation 'org.assertj:assertj-core:3.11.1' - testImplementation 'org.conscrypt:conscrypt-openjdk-uber:2.0.0' + testImplementation testLibs.junit.junit + testImplementation testLibs.assertj.core + testImplementation testLibs.conscrypt.openjdk.uber - testFixturesImplementation "org.whispersystems:signal-client-java:${LIBSIGNAL_CLIENT_VERSION}" - testFixturesImplementation 'junit:junit:4.12' + testFixturesImplementation libs.signal.client.java + testFixturesImplementation testLibs.junit.junit } dependencyVerification { diff --git a/lintchecks/build.gradle b/lintchecks/build.gradle index 0bd6cc8f73..fa571b8176 100644 --- a/lintchecks/build.gradle +++ b/lintchecks/build.gradle @@ -6,11 +6,11 @@ repositories { } dependencies { - compileOnly 'com.android.tools.lint:lint-api:26.6.3' - compileOnly 'com.android.tools.lint:lint-checks:26.6.3' + compileOnly lintLibs.lint.api + compileOnly lintLibs.lint.checks - testImplementation 'com.android.tools.lint:lint-tests:26.6.3' - testImplementation 'junit:junit:4.12' + testImplementation lintLibs.lint.tests + testImplementation testLibs.junit.junit } jar { diff --git a/paging/app/build.gradle b/paging/app/build.gradle index 026cabe184..99122ec9a4 100644 --- a/paging/app/build.gradle +++ b/paging/app/build.gradle @@ -22,13 +22,13 @@ android { } dependencies { - coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' + coreLibraryDesugaring libs.android.tools.desugar - implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'com.google.android.material:material:1.2.1' - implementation 'androidx.constraintlayout:constraintlayout:2.0.4' + implementation libs.androidx.appcompat + implementation libs.material.material + implementation libs.androidx.constraintlayout - testImplementation 'junit:junit:4.12' + testImplementation testLibs.junit.junit implementation project(':paging') } \ No newline at end of file diff --git a/paging/lib/build.gradle b/paging/lib/build.gradle index 472ffb9fa6..58edd47656 100644 --- a/paging/lib/build.gradle +++ b/paging/lib/build.gradle @@ -22,8 +22,8 @@ dependencyVerification { } dependencies { - implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'com.google.android.material:material:1.2.1' + implementation libs.androidx.appcompat + implementation libs.material.material implementation project(':core-util') - testImplementation 'junit:junit:4.12' + testImplementation testLibs.junit.junit } \ No newline at end of file diff --git a/paging/lib/witness-verifications.gradle b/paging/lib/witness-verifications.gradle index fd3a49ad84..2d744ab1b1 100644 --- a/paging/lib/witness-verifications.gradle +++ b/paging/lib/witness-verifications.gradle @@ -9,8 +9,8 @@ dependencyVerification { ['androidx.annotation:annotation-experimental:1.0.0', 'b219d2b568e7e4ba534e09f8c2fd242343df6ccbdfbbe938846f5d740e6b0b11'], - ['androidx.annotation:annotation:1.1.0', - 'd38d63edb30f1467818d50aaf05f8a692dea8b31392a049bfa991b159ad5b692'], + ['androidx.annotation:annotation:1.2.0', + '9029262bddce116e6d02be499e4afdba21f24c239087b76b3b57d7e98b490a36'], ['androidx.appcompat:appcompat-resources:1.2.0', 'c470297c03ff3de1c3d15dacf0be0cae63abc10b52f021dd07ae28daa3100fe5'], @@ -30,11 +30,17 @@ dependencyVerification { ['androidx.collection:collection:1.1.0', '632a0e5407461de774409352940e292a291037724207a787820c77daf7d33b72'], + ['androidx.constraintlayout:constraintlayout-solver:2.0.1', + 'b23732edbb3511d937fea1ffef047b0e6c001b50c1921f0d959fc384d706ec6a'], + + ['androidx.constraintlayout:constraintlayout:2.0.1', + 'ec15b5d4a2eff07888bc1499ce2e2c6efe24c0ed60cc57b08c9dc4b6fd3c2189'], + ['androidx.coordinatorlayout:coordinatorlayout:1.1.0', '44a9e30abf56af1025c52a0af506fee9c4131aa55efda52f9fd9451211c5e8cb'], - ['androidx.core:core:1.3.0', - '1c6b6626f15185d8f4bc7caac759412a1ab6e851ecf7526387d9b9fadcabdb63'], + ['androidx.core:core:1.3.1', + 'e92ea65a37d589943d405a6a54d1be9d12a225948f26c4e41e511dd55e81efb6'], ['androidx.cursoradapter:cursoradapter:1.0.0', 'a81c8fe78815fa47df5b749deb52727ad11f9397da58b16017f4eb2c11e28564'], @@ -42,15 +48,24 @@ dependencyVerification { ['androidx.customview:customview:1.0.0', '20e5b8f6526a34595a604f56718da81167c0b40a7a94a57daa355663f2594df2'], + ['androidx.documentfile:documentfile:1.0.0', + '865a061ef2fad16522f8433536b8d47208c46ff7c7745197dfa1eeb481869487'], + ['androidx.drawerlayout:drawerlayout:1.0.0', '9402442cdc5a43cf62fb14f8cf98c63342d4d9d9b805c8033c6cf7e802749ac1'], + ['androidx.dynamicanimation:dynamicanimation:1.0.0', + 'ce005162c229bf308d2d5b12fb6cad0874069cbbeaccee63a8193bd08d40de04'], + ['androidx.fragment:fragment:1.1.0', 'a14c8b8f2153f128e800fbd266a6beab1c283982a29ec570d2cc05d307d81496'], ['androidx.interpolator:interpolator:1.0.0', '33193135a64fe21fa2c35eec6688f1a76e512606c0fc83dc1b689e37add7732a'], + ['androidx.legacy:legacy-support-core-utils:1.0.0', + 'a7edcf01d5b52b3034073027bc4775b78a4764bb6202bb91d61c829add8dd1c7'], + ['androidx.lifecycle:lifecycle-common:2.1.0', '76db6be533bd730fb361c2feb12a2c26d9952824746847da82601ef81f082643'], @@ -69,6 +84,12 @@ dependencyVerification { ['androidx.loader:loader:1.0.0', '11f735cb3b55c458d470bed9e25254375b518b4b1bad6926783a7026db0f5025'], + ['androidx.localbroadcastmanager:localbroadcastmanager:1.0.0', + 'e71c328ceef5c4a7d76f2d86df1b65d65fe2acf868b1a4efd84a3f34336186d8'], + + ['androidx.print:print:1.0.0', + '1d5c7f3135a1bba661fc373fd72e11eb0a4adbb3396787826dd8e4190d5d9edd'], + ['androidx.recyclerview:recyclerview:1.1.0', 'f0d2b5a67d0a91ee1b1c73ef2b636a81f3563925ddd15a1d4e1c41ec28de7a4f'], @@ -93,8 +114,8 @@ dependencyVerification { ['androidx.viewpager:viewpager:1.0.0', '147af4e14a1984010d8f155e5e19d781f03c1d70dfed02a8e0d18428b8fc8682'], - ['com.google.android.material:material:1.2.1', - 'd3d0cc776f2341da8e572586c7d390a5b356ce39a0deb2768071dc40b364ac80'], + ['com.google.android.material:material:1.3.0', + 'cbf1e7d69fc236cdadcbd1ec5f6c0a1a41aca6ad1ef7f8481058956270ab1f0a'], ['com.google.protobuf:protobuf-javalite:3.10.0', '215a94dbe100130295906b531bb72a26965c7ac8fcd9a75bf8054a8ac2abf4b4'], diff --git a/settings.gradle b/settings.gradle index 09d7e28747..a86798ccb1 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,5 @@ +enableFeaturePreview('VERSION_CATALOGS') + include ':app' include ':libsignal-service' include ':lintchecks' @@ -21,3 +23,5 @@ project(':libsignal-service').projectDir = file('libsignal/service') project(':image-editor').projectDir = file('image-editor/lib') rootProject.name='Signal' + +apply from: 'dependencies.gradle' \ No newline at end of file diff --git a/video/build.gradle b/video/build.gradle index d4de5b6860..d900856c3d 100644 --- a/video/build.gradle +++ b/video/build.gradle @@ -24,13 +24,11 @@ dependencyVerification { dependencies { lintChecks project(':lintchecks') - api 'androidx.annotation:annotation:1.1.0' + api libs.androidx.annotation implementation project(':core-util') - implementation 'org.mp4parser:isoparser:1.9.39' - implementation 'org.mp4parser:streaming:1.9.39' - implementation('org.mp4parser:muxer:1.9.39') { + implementation(libs.bundles.mp4parser) { exclude group: 'junit', module: 'junit' } } diff --git a/video/witness-verifications.gradle b/video/witness-verifications.gradle index b74d887459..ba56007b9b 100644 --- a/video/witness-verifications.gradle +++ b/video/witness-verifications.gradle @@ -3,8 +3,8 @@ dependencyVerification { verify = [ - ['androidx.annotation:annotation:1.1.0', - 'd38d63edb30f1467818d50aaf05f8a692dea8b31392a049bfa991b159ad5b692'], + ['androidx.annotation:annotation:1.2.0', + '9029262bddce116e6d02be499e4afdba21f24c239087b76b3b57d7e98b490a36'], ['com.google.protobuf:protobuf-javalite:3.10.0', '215a94dbe100130295906b531bb72a26965c7ac8fcd9a75bf8054a8ac2abf4b4'],