// IMPORTANT: After changing a dependency, please run:
// ./gradlew --write-verification-metadata sha256 qa --rerun-tasks

dependencyResolutionManagement {
    versionCatalogs {
        libs {
            version('signal-client', '0.14.0')
            version('exoplayer', '2.15.0')
            version('androidx-camera', '1.0.0-beta11')
            version('androidx-lifecycle', '2.3.1')
            version('mp4parser', '1.9.39')
            version('kotlin', '1.5.10')

            // Desugaring
            alias('android-tools-desugar').to('com.android.tools:desugar_jdk_libs:1.1.5')

            // Kotlin
            alias('kotlin-stdlib-jdk8').to('org.jetbrains.kotlin', 'kotlin-stdlib-jdk8').versionRef('kotlin')
            alias('kotlin-reflect').to('org.jetbrains.kotlin', 'kotlin-reflect').versionRef('kotlin')

            // 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.11.4')
            alias('google-libphonenumber').to('com.googlecode.libphonenumber:libphonenumber:8.12.42')
            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-play-services-wallet').to('com.google.android.gms:play-services-wallet:18.1.3')
            alias('google-zxing-android-integration').to('com.google.zxing:android-integration:3.3.0')
            alias('google-zxing-core').to('com.google.zxing:core:3.4.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-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.19.2')
            alias('signal-android-database-sqlcipher').to('org.signal:android-database-sqlcipher:4.4.3-S8')

            // 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.13')
            alias('square-okio').to('com.squareup.okio:okio:2.2.2')
            alias('square-leakcanary').to('com.squareup.leakcanary:leakcanary-android:2.7')
            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('rxdogtag').to('com.uber.rxdogtag2:rxdogtag:2.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('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')

            // 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')

            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-inline:4.4.0')
            alias('mockito-kotlin').to('org.mockito.kotlin:mockito-kotlin:4.0.0')
            alias('robolectric-robolectric').to('org.robolectric', 'robolectric').versionRef('robolectric')
            alias('robolectric-shadows-multidex').to('org.robolectric', 'shadows-multidex').versionRef('robolectric')
            alias('bouncycastle-bcprov-jdk15on').to('org.bouncycastle:bcprov-jdk15on:1.70')
            alias('hamcrest-hamcrest').to('org.hamcrest:hamcrest:2.2')
            alias('assertj-core').to('org.assertj:assertj-core:3.11.1')

            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')
        }
    }
}