Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SDK versions && move dependencies #474

Merged
merged 14 commits into from
Dec 4, 2022
31 changes: 16 additions & 15 deletions barista-compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,22 @@ ext["PUBLISH_ARTIFACT_ID"] = "barista-compose"
apply(from = "${rootProject.projectDir}/scripts/publish-module.gradle")

android {
compileSdk = 31
compileSdk = 33

defaultConfig {
minSdk = 21
targetSdk = 31
targetSdk = 33

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments["clearPackageData"] = "true"
}

buildFeatures {
compose = true
}

composeOptions {
kotlinCompilerExtensionVersion = rootProject.extra["compose_version"] as String
kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get()
}

packagingOptions {
Expand All @@ -35,16 +36,16 @@ android {
}

dependencies {
api("androidx.test.ext:junit:1.1.3")
api("androidx.compose.ui:ui-test-junit4:1.0.2")

debugImplementation("androidx.compose.ui:ui:${rootProject.extra["compose_version"]}")
debugImplementation("androidx.compose.material:material:${rootProject.extra["compose_version"]}")
debugImplementation("androidx.compose.ui:ui-tooling-preview:${rootProject.extra["compose_version"]}")
debugImplementation("androidx.lifecycle:lifecycle-runtime-ktx:2.3.1")
debugImplementation("androidx.activity:activity-compose:1.3.1")
debugImplementation("androidx.compose.ui:ui-test-junit4:${rootProject.extra["compose_version"]}")
debugImplementation("androidx.compose.ui:ui-test-manifest:${rootProject.extra["compose_version"]}")
debugImplementation("androidx.compose.ui:ui-tooling:${rootProject.extra["compose_version"]}")
api(libs.androidX.test.junit)
api(libs.androidX.compose.test.ui.junit4)

debugImplementation(libs.androidX.compose.ui.ui)
debugImplementation(libs.androidX.compose.material)
debugImplementation(libs.androidX.compose.ui.tooling.preview)
debugImplementation(libs.androidX.compose.ui.tooling.core)
debugImplementation(libs.androidX.compose.test.ui.manifest)

debugImplementation(libs.androidX.lifecycle)
debugImplementation(libs.androidX.activity.compose)

}
42 changes: 21 additions & 21 deletions barista/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ ext["PUBLISH_ARTIFACT_ID"] = "barista"
apply(from = "${rootProject.projectDir}/scripts/publish-module.gradle")

android {
compileSdk = 30
compileSdk = 33

defaultConfig {
minSdk = 19
targetSdk = 30
minSdk = 21
targetSdk = 33
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

Expand All @@ -24,22 +24,22 @@ android {
}

dependencies {
api("androidx.test.espresso:espresso-core:3.4.0")
api("androidx.test.espresso:espresso-contrib:3.4.0")
api("androidx.test.uiautomator:uiautomator:2.2.0")
api("androidx.test.espresso:espresso-intents:3.4.0")


implementation("androidx.annotation:annotation:1.0.2")
implementation("androidx.legacy:legacy-support-core-ui:1.0.0")
implementation("androidx.vectordrawable:vectordrawable-animated:1.0.0")
implementation("androidx.recyclerview:recyclerview:1.0.0")
api("androidx.viewpager2:viewpager2:1.0.0")

implementation("com.google.android.material:material:1.2.0")

testImplementation("junit:junit:4.12")
testImplementation("pl.pragmatists:JUnitParams:1.1.0")
testImplementation("org.assertj:assertj-core:1.7.0")
testImplementation("org.mockito:mockito-core:2.28.2")
api(libs.androidX.test.espresso.core)
api(libs.androidX.test.espresso.contrib)
api(libs.androidX.test.uiAutomator)
api(libs.androidX.test.espresso.intents)
implementation(libs.androidX.annotation)
implementation(libs.androidX.legacy.support)
implementation(libs.androidX.vectorDrawable.animated)
implementation(libs.androidX.recyclerView)
api(libs.androidX.viewPager2)

implementation(libs.androidX.material)

testImplementation(libs.testing.jUnit)
testImplementation(libs.testing.jUnitParams)
testImplementation(libs.testing.assertJ)

testImplementation(libs.testing.mockito.core)
}
13 changes: 5 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
buildscript {
ext {
compose_version = '1.0.2'
}
repositories {
maven { url "https://plugins.gradle.org/m2/" }
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21"
classpath "io.github.gradle-nexus:publish-plugin:1.1.0"
classpath("io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.22.0")
classpath libs.android.gradlePlugin
classpath libs.kotlin.gradlePlugin
classpath libs.nexus.publish
classpath libs.nexus.staging
}
}
apply plugin: 'io.github.gradle-nexus.publish-plugin'
Expand All @@ -27,4 +24,4 @@ task clean(type: Delete) {
delete rootProject.buildDir
}

apply from: "${rootDir}/scripts/publish-root.gradle"
apply from: "${rootDir}/scripts/publish-root.gradle"
71 changes: 71 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
[versions]
gradlePlugin = "7.3.1"
kotlin = "1.7.20"
nexusPublish = "1.1.0"
nexusStaging = "0.22.0"
compose = "1.3.1"
composeCompiler = "1.3.2"
androidXAppCompat = "1.0.2"
androidXAnnotation = "1.0.2"
androidXCore = "1.0.1"
androidXEspresso = "3.4.0"
androidXJUnit = "1.1.3"
androidXLegacy = "1.0.0"
androidXLifecycle = "2.3.1"
androidXMaterial = "1.2.0"
androidXOrchestrator = "1.4.1"
androidXRecyclerView = "1.0.0"
androidXVectorDrawable = "1.0.0"
androidXViewPager2 = "1.0.0"
uiAutomator = "2.2.0"

glide = "4.10.0"

assertJ = "2.9.1"
jUnit = "4.12"
jUnitParams = "1.1.0"
mockito = "2.28.2"
mockitoKotlin = "1.5.0"

[libraries]

android-gradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "gradlePlugin" }
kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
nexus-publish = { module = "io.github.gradle-nexus:publish-plugin", version.ref = "nexusPublish" }
nexus-staging = { module = "io.codearte.gradle.nexus:gradle-nexus-staging-plugin", version.ref = "nexusStaging" }

androidX-test-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "androidXEspresso" }
androidX-test-espresso-contrib = { module = "androidx.test.espresso:espresso-contrib", version.ref = "androidXEspresso" }
androidX-test-espresso-intents = { module = "androidx.test.espresso:espresso-intents", version.ref = "androidXEspresso" }
androidX-test-junit = { module = "androidx.test.ext:junit", version.ref = "androidXJUnit" }
androidX-test-orchestrator = { module = "androidx.test:orchestrator", version.ref = "androidXOrchestrator" }
androidX-test-uiAutomator = { module = "androidx.test.uiautomator:uiautomator", version.ref = "uiAutomator" }

androidX-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "compose" }
androidX-annotation = { module = "androidx.annotation:annotation", version.ref = "androidXAnnotation" }
androidX-appCompat = { module = "androidx.appcompat:appcompat", version.ref = "androidXAppCompat" }
androidX-core = { module = "androidx.core:core-ktx", version.ref = "androidXCore" }
androidX-legacy-support = { module = "androidx.legacy:legacy-support-core-ui", version.ref = "androidXLegacy" }
androidX-legacy-supportV4 = { module = "androidx.legacy:legacy-support-v4", version.ref = "androidXLegacy" }
androidX-lifecycle = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidXLifecycle" }
androidX-material = { module = "com.google.android.material:material", version.ref = "androidXMaterial" }
androidX-recyclerView = { module = "androidx.recyclerview:recyclerview", version.ref = "androidXRecyclerView" }
androidX-vectorDrawable-animated = { module = "androidx.vectordrawable:vectordrawable-animated", version.ref = "androidXVectorDrawable" }
androidX-viewPager2 = { module = "androidx.viewpager2:viewpager2", version.ref = "androidXViewPager2" }

androidX-compose-ui-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" }
androidX-compose-ui-tooling-core = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
androidX-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" }
androidX-compose-material = { module = "androidx.compose.material:material", version.ref = "compose" }

androidX-compose-test-ui-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "compose" }
androidX-compose-test-ui-manifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "compose" }

glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" }

testing-assertJ = { module = "org.assertj:assertj-core", version.ref = "assertJ" }
testing-jUnit = { module = "junit:junit", version.ref = "jUnit" }
testing-jUnitParams = { module = "pl.pragmatists:JUnitParams", version.ref = "jUnitParams" }
testing-mockito-android = { module = "org.mockito:mockito-android", version.ref = "mockito" }
testing-mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" }
testing-mockito-kotlin = { module = "com.nhaarman:mockito-kotlin", version.ref = "mockitoKotlin" }
5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Sat Dec 03 13:54:10 CET 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
34 changes: 18 additions & 16 deletions sample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ plugins {
apply(from = "../config/android-quality.gradle")

android {
compileSdk = 30
compileSdk = 33

defaultConfig {
minSdk = 21
targetSdk = 30
targetSdk = 33

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments["clearPackageData"] = "true"
Expand All @@ -30,22 +30,24 @@ android {
}

dependencies {
implementation("androidx.legacy:legacy-support-v4:1.0.0")
implementation("androidx.appcompat:appcompat:1.0.2")
implementation("androidx.recyclerview:recyclerview:1.0.0")
implementation("com.google.android.material:material:1.2.0")
implementation("androidx.annotation:annotation:1.0.2")
implementation("com.github.bumptech.glide:glide:4.10.0")
implementation("com.google.android.material:material:1.2.0")
implementation("androidx.core:core-ktx:1.0.1")

androidTestUtil("androidx.test:orchestrator:1.4.1")
implementation(libs.androidX.legacy.supportV4)

implementation(libs.androidX.appCompat)
implementation(libs.androidX.recyclerView)
implementation(libs.androidX.material)
implementation(libs.androidX.annotation)

implementation(libs.glide)
implementation(libs.androidX.material)
implementation(libs.androidX.core)

androidTestUtil(libs.androidX.test.orchestrator)
androidTestImplementation(project(":barista"))

androidTestImplementation("org.assertj:assertj-core:2.9.1")
androidTestImplementation("com.nhaarman:mockito-kotlin:1.5.0")
androidTestImplementation("org.mockito:mockito-android:2.28.2")
androidTestImplementation(libs.testing.assertJ)
androidTestImplementation(libs.testing.mockito.kotlin)
androidTestImplementation(libs.testing.mockito.android)

testImplementation("junit:junit:4.12")
testImplementation(libs.testing.jUnit)

}
2 changes: 1 addition & 1 deletion sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<activity android:name=".RecyclerViewsWithDifferentDataInsideViewPagerActivity"/>
<activity android:name=".ListViewsWithDifferentDataInsideViewPagerActivity"/>
<activity android:name=".NestedScrollViewActivity"/>
<activity android:name=".CameraActivity">
<activity android:name=".CameraActivity" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

Expand Down
12 changes: 0 additions & 12 deletions settings.gradle

This file was deleted.

13 changes: 13 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
enableFeaturePreview("VERSION_CATALOGS")

pluginManagement {
repositories {
google()
mavenCentral()
}
}

include(":sample")

include(":barista")
include(":barista-compose")