mirror of
https://github.com/aljazceru/Android-nRF-Toolbox.git
synced 2025-12-23 17:34:28 +01:00
Add VERRSION_CATALOGS feature to gradle
This commit is contained in:
@@ -49,17 +49,15 @@ android {
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation 'androidx.core:core-ktx:1.6.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.3.1'
|
||||
implementation 'com.google.android.material:material:1.4.0'
|
||||
implementation "androidx.compose.ui:ui:$compose_version"
|
||||
implementation "androidx.compose.material:material:$compose_version"
|
||||
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
|
||||
implementation 'androidx.activity:activity-compose:1.3.1'
|
||||
testImplementation 'junit:junit:4.+'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
|
||||
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
|
||||
implementation libs.bundles.compose
|
||||
implementation libs.androidx.core
|
||||
implementation libs.material
|
||||
implementation libs.lifecycle
|
||||
implementation libs.compose.activity
|
||||
|
||||
testImplementation libs.test.junit
|
||||
androidTestImplementation libs.android.test.junit
|
||||
androidTestImplementation libs.android.test.espresso
|
||||
androidTestImplementation libs.android.test.compose.ui
|
||||
debugImplementation libs.android.test.compose.tooling
|
||||
}
|
||||
@@ -17,13 +17,6 @@ buildscript {
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: "io.spring.dependency-management"
|
||||
|
||||
task clean(type: Delete) {
|
||||
|
||||
@@ -1,11 +1,38 @@
|
||||
//dependencyResolutionManagement {
|
||||
// repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
// repositories {
|
||||
// google()
|
||||
// mavenCentral()
|
||||
// jcenter() // Warning: this repository is going to shut down soon
|
||||
// }
|
||||
//}
|
||||
enableFeaturePreview("VERSION_CATALOGS")
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
jcenter() // Warning: this repository is going to shut down soon
|
||||
}
|
||||
|
||||
versionCatalogs {
|
||||
libs {
|
||||
version('compose', '1.0.2')
|
||||
|
||||
alias('androidx-core').to('androidx.core:core-ktx:1.6.0')
|
||||
alias('material').to('com.google.android.material:material:1.4.0')
|
||||
alias('lifecycle').to('androidx.lifecycle:lifecycle-runtime-ktx:2.3.1')
|
||||
alias('compose-activity').to('androidx.activity:activity-compose:1.3.1')
|
||||
|
||||
alias('compose-ui').to('androidx.compose.ui', 'ui').versionRef('compose')
|
||||
alias('compose-material').to('androidx.compose.material', 'material').versionRef('compose')
|
||||
alias('compose-tooling-preview').to('androidx.compose.ui', 'ui-tooling-preview').versionRef('compose')
|
||||
|
||||
bundle('compose', ['compose-ui', 'compose-material', 'compose-tooling-preview'])
|
||||
|
||||
//-- Test ------------------------------------------------------------------------------
|
||||
alias('test-junit').to('junit:junit:4.13.2')
|
||||
alias('android-test-junit').to('androidx.test.ext:junit:1.1.3')
|
||||
alias('android-test-espresso').to('androidx.test.espresso:espresso-core:3.4.0')
|
||||
alias('android-test-compose-ui').to('androidx.compose.ui', 'ui-test-junit4').versionRef('compose')
|
||||
alias('android-test-compose-tooling').to('androidx.compose.ui', 'ui-tooling').versionRef('compose')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "Test"
|
||||
include ':app'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user