Skip to content

Instantly share code, notes, and snippets.

@twiceyuan
Last active January 17, 2024 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twiceyuan/941c695ba0297c56878bc8ca2806b931 to your computer and use it in GitHub Desktop.
Save twiceyuan/941c695ba0297c56878bc8ca2806b931 to your computer and use it in GitHub Desktop.
[常用三方库定义 VersionCatalog] #Gradle #Pinned
# Library 定义
[libraries]
# AndroidX 系列
androidx-core = "androidx.core:core:1.8.0"
androidx-legacy = "androidx.legacy:legacy-support-v4:1.0.0"
androidx-fragment = "androidx.fragment:fragment-ktx:1.3.6"
androidx-appcompat = "androidx.appcompat:appcompat:1.3.1"
androidx-recyclerview = "androidx.recyclerview:recyclerview:1.2.1"
androidx-transition = "androidx.transition:transition:1.4.1"
androidx-preference = "androidx.preference:preference-ktx:1.1.1"
androidx-viewpager = "androidx.viewpager:viewpager:1.0.0"
androidx-exifinterface = "androidx.exifinterface:exifinterface:1.3.3"
androidx-camerax-view = { module = "androidx.camera:camera-view", version = "1.0.0-alpha28" }
androidx-camerax-core = { module = "androidx.camera:camera-core", version.ref = "camerax-version" }
androidx-camerax-camera2 = { module = "androidx.camera:camera-camera2", version.ref = "camerax-version" }
androidx-camerax-lifecycle = { module = "androidx.camera:camera-lifecycle", version.ref = "camerax-version" }
androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "room-version" }
androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "room-version" }
androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "room-version" }
androidx-navigation-fragment = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "navigation-version" }
androidx-annotation = "androidx.annotation:annotation:1.3.0"
androidx-browser = "androidx.browser:browser:1.3.0"
androidx-constraintlayout = "androidx.constraintlayout:constraintlayout:2.1.0"
androidx-core-ktx = "androidx.core:core-ktx:1.5.0"
androidx-lifecycle-common = { module = "androidx.lifecycle:lifecycle-common-java8", version.ref = "lifecycle-version" }
androidx-lifecycle-process = { module = "androidx.lifecycle:lifecycle-process", version.ref = "lifecycle-version" }
androidx-swiperefreshlayout = "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
androidx-startup = "androidx.startup:startup-runtime:1.0.0"
androidx-media = { module = "androidx.media:media", version = "1.4.3" }
androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycle-version" }
androidx-lifecycle-livedata = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycle-version" }
androidx-lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime", version.ref = "lifecycle-version" }
androidx-paging-common = { module = "androidx.paging:paging-common-ktx", version.ref = "paging-version" }
androidx-lifecycle-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycle-version" }
androidx-paging-runtime = { module = "androidx.paging:paging-runtime-ktx", version.ref = "paging-version" }
androidx-cardview = "androidx.cardview:cardview:1.0.0"
androidx-navigation-ui = { module = "androidx.navigation:navigation-ui-ktx", version.ref = "navigation-version" }
androidx-localbroadcastmanager = "androidx.localbroadcastmanager:localbroadcastmanager:1.0.0"
androidx-activity-ktx = "androidx.activity:activity-ktx:1.6.1"
androidx-activity-compose = "androidx.activity:activity-compose:1.3.1"
androidx-viewpager2 = "androidx.viewpager2:viewpager2:1.0.0"
# RxJava & RxAndroid
rxandroid = "io.reactivex:rxandroid:1.2.1"
rxjava = "io.reactivex:rxjava:1.3.0"
rxandroid2 = "io.reactivex.rxjava2:rxandroid:2.0.2"
rxjava2 = "io.reactivex.rxjava2:rxjava:2.2.4"
# Compose 相关
compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose-version" }
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose-version" }
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose-version" }
compose-material = { module = "androidx.compose.material:material", version.ref = "compose-version" }
compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "material3-version" }
compose-accompanist-insets-ui = { module = "com.google.accompanist:accompanist-insets-ui", version.ref = "accompanist-version" }
compose-ui-util = { module = "androidx.compose.ui:ui-util", version.ref = "compose-version" }
compose-ui-test = { module = "androidx.compose.ui:ui-test", version.ref = "compose-version" }
compose-constraintlayout = "androidx.constraintlayout:constraintlayout-compose:1.0.0"
compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "compose-version" }
compose-viewmodel = "androidx.lifecycle:lifecycle-viewmodel-compose:2.4.1"
compose-runtime-livedata = { module = "androidx.compose.runtime:runtime-livedata", version.ref = "compose-version" }
compose-accompanist-pager = { module = "com.google.accompanist:accompanist-pager", version.ref = "accompanist-version" }
compose-accompanist-pager-indicators = { module = "com.google.accompanist:accompanist-pager-indicators", version.ref = "accompanist-version" }
compose-accompanist = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "accompanist-version" }
compose-accompanist-insets = { module = "com.google.accompanist:accompanist-insets", version.ref = "accompanist-version" }
compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose-version" }
compose-materil-icons = { module = "androidx.compose.material:material-icons-core", version.ref = "compose-version" }
compose-materil-icons-extended = { module = "androidx.compose.material:material-icons-extended", version.ref = "compose-version" }
compose-runtime-rxjava = { module = "androidx.compose.runtime:runtime-rxjava2", version.ref = "compose-version" }
compose-animation = { module = "androidx.compose.animation:animation", version.ref = "compose-version" }
# Coroutines 相关
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines-version" }
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines-version" }
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines-version" }
kotlinx-coroutines-jdk8 = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8", version.ref = "coroutines-version" }
# Squareup
squareup-okio = "com.squareup.okio:okio:3.0.0"
squareup-kotlinpoet = "com.squareup:kotlinpoet:1.10.2"
squareup-javapoet = "com.squareup:javapoet:1.13.0"
squareup-retrofit = "com.squareup.retrofit2:retrofit:2.9.0"
squareup-retrofit-gson = "com.squareup.retrofit2:converter-gson:2.9.0"
squareup-okhttp = "com.squareup.okhttp3:okhttp:4.12.0"
squareup-okhttp-mockwebserver = "com.squareup.okhttp3:mockwebserver:4.8.1"
squareup-moshi-kotlin = { module = "com.squareup.moshi:moshi-kotlin", version.ref = "moshi-version" }
squareup-moshi = { module = "com.squareup.moshi:moshi", version.ref = "moshi-version" }
squareup-leakcanary = "com.squareup.leakcanary:leakcanary-android:2.9.1"
# Koin
koin-test = { module = "io.insert-koin:koin-test", version.ref = "koin-version" }
koin-compose = { module = "io.insert-koin:koin-androidx-compose", version.ref = "koin-android-compose-version" }
koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin-version" }
koin-android = { module = "io.insert-koin:koin-android", version.ref = "koin-android-version" }
koin-android-compat = { module = "io.insert-koin:koin-android-compat", version.ref = "koin-android-version" }
# Google
google-gson = "com.google.code.gson:gson:2.8.2"
google-material = "com.google.android.material:material:1.4.0"
google-exoplayer-ui = { module = "com.google.android.exoplayer:exoplayer-ui", version.ref = "exoplayer-version" }
google-exoplayer = { module = "com.google.android.exoplayer:exoplayer", version.ref = "exoplayer-version" }
google-exoplayer-core = { module = "com.google.android.exoplayer:exoplayer-core", version.ref = "exoplayer-version" }
google-zxing = "com.google.zxing:core:3.3.3"
google-flexbox = "com.google.android:flexbox:2.0.1"
google-guava = "com.google.guava:guava:27.0.1-android"
google-mlkit-image-labeling = "com.google.mlkit:image-labeling:17.0.7"
google-ai-generativeai = "com.google.ai.client.generativeai:generativeai:0.1.2"
# Firebase
firebase-bom = "com.google.firebase:firebase-bom:30.0.1"
firebase-crashlytics-ktx = "com.google.firebase:firebase-crashlytics-ktx:18.2.10"
firebase-perf-ktx = "com.google.firebase:firebase-perf-ktx:20.0.6"
firebase-analytics-ktx = "com.google.firebase:firebase-analytics-ktx:21.0.0"
firebase-ml-version = "com.google.firebase:firebase-ml-vision:24.0.3"
firebase-ml-version-image-label-model = "com.google.firebase:firebase-ml-vision-image-label-model:20.0.1"
firebase-config = "com.google.firebase:firebase-config:21.1.1"
test-androidx-junit = { module = "androidx.test.ext:junit", version = "1.1.3" }
test-androidx-espresso = { module = "androidx.test.espresso:espresso-core", version = "3.4.0" }
test-junit = { module = "junit:junit", version = "4.13.2" }
test-power-mock-api-mockito = "org.powermock:powermock-api-mockito2:2.0.7"
test-power-mock = "org.powermock:powermock-module-junit4:2.0.7"
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin-version" }
kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin-version" }
kotlin-csv-jvm = "com.github.doyaaaaaken:kotlin-csv-jvm:1.5.1"
openjdk-jol-core = "org.openjdk.jol:jol-core:0.16"
test-truth = "com.google.truth:truth:0.36"
trustkit = "com.datatheorem.android.trustkit:trustkit:1.1.3"
timber = "com.jakewharton.timber:timber:5.0.1"
greenrobot-eventbus = "de.greenrobot:eventbus:2.4.0"
danikula-videocache = "com.danikula:videocache:2.7.1"
greenrobot-greendao = "org.greenrobot:greendao:3.2.2"
glide-compiler = { module = "com.github.bumptech.glide:compiler", version.ref = "glide-version" }
glide-coder = { module = "com.github.bumptech.glide:gifdecoder", version.ref = "glide-version" }
glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide-version" }
kotlinx-serialization-json = "org.jetbrains.kotlinx:kotlinx-serialization-json:1.2.2"
json-json = { module = "org.json:json", version = "20190722" }
jsoup-core = "org.jsoup:jsoup:1.15.2"
smartrefresh = "com.scwang.smartrefresh:SmartRefreshLayout:1.0.3"
test-androidx-runner = "androidx.test:runner:1.3.0"
test-androidx-rules = "androidx.test:rules:1.4.0"
javax-inject = "javax.inject:javax.inject:1"
tailor = "com.github.bytedance:tailor:1.1.0"
test-robolectric = "org.robolectric:robolectric:4.5.1"
test-mockk = "io.mockk:mockk:1.12.2"
test-mockito-core = "org.mockito:mockito-core:2.7.19"
test-mockito-kotlin = "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
jakewharton-threetenabp = "com.jakewharton.threetenabp:threetenabp:1.3.1"
lottie-compose = "com.airbnb.android:lottie-compose:4.2.2"
dokit-core = { module = "io.github.didi.dokit:dokitx", version.ref = "dokit-version" }
dokit-no-op = { module = "io.github.didi.dokit:dokitx-no-op", version.ref = "dokit-version" }
sqlite-jdbc = "org.xerial:sqlite-jdbc:3.36.0"
sinaweibosdk = "io.github.sinaweibosdk:core:11.12.0"
play-services-maps = { module = "com.google.android.gms:play-services-maps", version.ref = "gms-version" }
play-services-base = { module = "com.google.android.gms:play-services-base", version.ref = "gms-version" }
play-services-tasks = "com.google.android.gms:play-services-tasks:18.0.1"
coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil-version" }
coil = { module = "io.coil-kt:coil", version.ref = "coil-version" }
wechat-sdk = "com.tencent.mm.opensdk:wechat-sdk-android-without-mta:5.5.8"
relinker = "com.getkeepsafe.relinker:relinker:1.4.1"
mmkv = "com.tencent:mmkv:1.2.2"
lottie = "com.airbnb.android:lottie:4.2.2"
logan = "com.dianping.android.sdk:logan:1.2.2"
ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor-version" }
ktor-client-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor-version" }
clikt = "com.github.ajalt.clikt:clikt:3.5.0"
kaml = "com.charleskorn.kaml:kaml:0.48.0"
compressor = "id.zelory:compressor:3.0.1"
zip4j = "net.lingala.zip4j:zip4j:2.6.4"
multitype = 'com.drakeet.multitype:multitype:4.3.0'
# twiceyuan 自用库
twiceyuan-commonadapter = { module = "com.github.twiceyuan.CommonAdapter:library", version.ref = "common-adapter-version" }
twiceyuan-commonadapter-ktx = { module = "com.github.twiceyuan.CommonAdapter:kotlin-extension", version.ref = "common-adapter-version" }
twiceyuan-safetyparams = "com.github.twiceyuan:SafetyParams:1.4"
twiceyuan-valuekit = "com.github.twiceyuan.ValueKit:valuekit:b7ba8c15d0"
twiceyuan-valuekit-mmkv = "com.github.twiceyuan.ValueKit:valuekit-mmkv:b7ba8c15d0"
[bundles]
camerax = ["androidx-camerax-camera2", "androidx-camerax-core", "androidx-camerax-lifecycle", "androidx-camerax-view"]
exoplayer = ["google-exoplayer", "google-exoplayer-core", "google-exoplayer-ui"]
lifecycle = ["androidx-lifecycle-livedata", "androidx-lifecycle-viewmodel"]
coroutines = ["kotlinx-coroutines-android", "kotlinx-coroutines-core"]
koin = ["koin-core", "koin-android"]
room = ["androidx-room-runtime", "androidx-room-ktx"]
room-compiler = ["androidx-room-compiler", "sqlite-jdbc"]
compose = ["compose-ui", "compose-ui-tooling", "compose-ui-tooling-preview", "compose-material", "compose-accompanist-insets-ui", "compose-ui-util", "compose-constraintlayout", "compose-viewmodel", "compose-runtime-livedata", "compose-accompanist-pager", "compose-accompanist-pager-indicators", "compose-accompanist", "compose-accompanist-insets", "compose-foundation", "compose-materil-icons", "compose-materil-icons-extended", "compose-runtime-rxjava", "compose-animation", "coil-compose", "androidx-activity-compose"]
twiceyuan-commonadapter = ["twiceyuan-commonadapter", "twiceyuan-commonadapter-ktx"]
[plugins]
agp-library = { id = "com.android.library", version.ref = "agp-version" }
agp-application = { id = "com.android.application", version.ref = "agp-version" }
jfrog-artifactory = { id = "com.jfrog.artifactory", version = "4.24.23" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin-version" }
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin-version" }
google-service = { id = "com.google.gms.google-services", version = "4.3.14" }
firebase-crashlytics = { id = "com.google.firebase.crashlytics", version = "2.9.2" }
firebase-perf = { id = "com.google.firebase.firebase-perf", version = "1.4.2" }
[versions]
minsdk = "23"
coroutines-version = "1.5.1"
build-tools-version = "31.0.0"
camerax-version = "1.0.2"
compose-version = "1.5.3"
lifecycle-version = "2.3.1"
exoplayer-version = "2.15.0"
room-version = "2.3.0"
navigation-version = "2.1.0"
koin-version = "3.2.2"
koin-android-version = "3.3.0"
koin-android-compose-version = "3.3.0"
paging-version = "2.1.0"
agp-version = "8.2.0"
glide-version = "4.14.2"
moshi-version = "1.13.0"
accompanist-version = "0.20.3"
compilesdk = "34"
targetsdk = "34"
dokit-version = "3.5.0.1"
gms-version = "18.1.0"
kotlin-version = "1.9.10"
coil-version = "1.4.0"
ktor-version = "2.3.7"
common-adapter-version = "0.9.1"
material3-version = "1.1.2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment