Skip to content

Commit

Permalink
Update advanced dependencies (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
yschimke authored Feb 18, 2022
1 parent d16fa81 commit f375a8b
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 86 deletions.
11 changes: 5 additions & 6 deletions ComposeAdvanced/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

plugins {
id "com.android.application"
id "kotlin-android"
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}

android {
Expand All @@ -41,7 +42,6 @@ android {
}
kotlinOptions {
jvmTarget = "1.8"
useIR = true
freeCompilerArgs += "-Xjvm-default=compatibility"
freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
// Allow for widescale experimental APIs in Alpha libraries we build upon
Expand All @@ -53,7 +53,7 @@ android {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion "$compose_version"
kotlinCompilerExtensionVersion libs.versions.compose.get()
}
packagingOptions {
resources {
Expand All @@ -79,9 +79,8 @@ dependencies {
// Annotation processor
implementation libs.androidx.lifecycle.common.java8


// Compose for Wear OS Dependencies
// Developer Preview starts with Alpha 07, with new releases coming soon.
// Developer Preview currently Alpha, with new releases coming soon.
// NOTE: DO NOT INCLUDE a dependency on androidx.compose.material:material.
// androidx.wear.compose:compose-material is designed as a replacement not an addition to
// androidx.compose.material:material. If there are features from that you feel are missing from
Expand Down
45 changes: 3 additions & 42 deletions ComposeAdvanced/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,44 +14,19 @@
* limitations under the License.
*/
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
// Dependency versions.
activity_compose_version = "1.4.0"
compose_version = "1.2.0-alpha02"
lifecycle_version = "2.4.0"
wear_compose_version = "1.0.0-alpha15"

junit_version = "4.13.2"
androidx_test_ext_junit_version = "1.1.3"
espresso_version = "3.4.0"
}

repositories {
google()
mavenCentral()
}
buildscript {
dependencies {
classpath libs.android.build.gradle
classpath libs.kotlin.gradle.plugin

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

plugins {
id "com.diffplug.spotless" version "6.0.1"
id "com.github.ben-manes.versions" version "0.41.0"
id "nl.littlerobots.version-catalog-update" version "0.3.0"
alias(libs.plugins.com.diffplug.spotless) apply(false)
alias(libs.plugins.com.android.application) apply(false)
}

subprojects {
repositories {
google()
mavenCentral()
}

apply plugin: "com.diffplug.spotless"

spotless {
Expand All @@ -65,17 +40,3 @@ subprojects {
}
}
}

tasks.named("dependencyUpdates").configure {
rejectVersionIf {
(it.candidate.version ==~ /.*-alpha.*/ && !(it.currentVersion ==~ /.*-alpha.*/)) ||
(it.candidate.version ==~ /.*-beta.*/ && !(it.currentVersion ==~ /.*-(beta|alpha).*/)) ||
(it.candidate.version ==~ /.*1.6.20-M.*/)
}
}

versionCatalogUpdate {
keep {
keepUnusedVersions = true
}
}
68 changes: 33 additions & 35 deletions ComposeAdvanced/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,52 +1,51 @@
[versions]
compose-ui = "1.2.0-alpha02"
androidx-lifecycle = "2.4.0"
androidx-wear-compose = "1.0.0-alpha15"
androidx-lifecycle = "2.4.1"
androidx-wear-compose = "1.0.0-alpha16"
compose = "1.2.0-alpha03"

[libraries]
android-build-gradle = "com.android.tools.build:gradle:7.1.1"
androidx-activity-compose = "androidx.activity:activity-compose:1.4.0"
compose-compiler = "androidx.compose.compiler:compiler:1.2.0-alpha02"
compose-foundation = "androidx.compose.foundation:foundation:1.2.0-alpha02"
compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "compose-ui" }
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose-ui" }
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose-ui" }
androidx-lifecycle-common-java8 = { module = "androidx.lifecycle:lifecycle-common-java8", version.ref = "androidx-lifecycle" }
androidx-lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "androidx-lifecycle" }
androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle" }
androidx-lifecycle-viewmodel-savedstate = { module = "androidx.lifecycle:lifecycle-viewmodel-savedstate", version.ref = "androidx-lifecycle" }
compose-compiler = "androidx.compose.compiler:compiler:1.2.0-alpha03"
compose-foundation = "androidx.compose.foundation:foundation:1.2.0-alpha03"
compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "compose" }
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" }
jacoco-ant = "org.jacoco:org.jacoco.ant:0.8.7"
junit = "junit:junit:4.13.2"
kotlin-gradle-plugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
test-espresso-core = "androidx.test.espresso:espresso-core:3.4.0"
test-ext-junit = "androidx.test.ext:junit:1.1.3"
wear-compose-foundation = { module = "androidx.wear.compose:compose-foundation", version.ref = "androidx-wear-compose" }
wear-compose-material = { module = "androidx.wear.compose:compose-material", version.ref = "androidx-wear-compose" }
wear-compose-navigation = { module = "androidx.wear.compose:compose-navigation", version.ref = "androidx-wear-compose" }
android-build-gradle = "com.android.tools.build:gradle:7.1.0"
junit = "junit:junit:4.13.2"
jacoco-ant = "org.jacoco:org.jacoco.ant:0.8.3"
kotlin-gradle-plugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"

[plugins]
android = "android:7.1.0"
android-library = "android-library:7.1.0"
android-reporting = "android-reporting:7.1.0"
com-android-application = "com.android.application:7.1.0"
com-android-asset-pack = "com.android.asset-pack:7.1.0"
com-android-asset-pack-bundle = "com.android.asset-pack-bundle:7.1.0"
com-android-base = "com.android.base:7.1.0"
com-android-dynamic-feature = "com.android.dynamic-feature:7.1.0"
com-android-internal-application = "com.android.internal.application:7.1.0"
com-android-internal-asset-pack = "com.android.internal.asset-pack:7.1.0"
com-android-internal-asset-pack-bundle = "com.android.internal.asset-pack-bundle:7.1.0"
com-android-internal-dynamic-feature = "com.android.internal.dynamic-feature:7.1.0"
com-android-internal-library = "com.android.internal.library:7.1.0"
com-android-internal-reporting = "com.android.internal.reporting:7.1.0"
com-android-internal-test = "com.android.internal.test:7.1.0"
com-android-internal-version-check = "com.android.internal.version-check:7.1.0"
com-android-library = "com.android.library:7.1.0"
com-android-lint = "com.android.lint:7.1.0"
com-android-reporting = "com.android.reporting:7.1.0"
com-android-test = "com.android.test:7.1.0"
com-diffplug-spotless = "com.diffplug.spotless:6.0.1"
com-github-ben-manes-versions = "com.github.ben-manes.versions:0.41.0"
android = "android:7.1.1"
android-library = "android-library:7.1.1"
android-reporting = "android-reporting:7.1.1"
com-android-application = "com.android.application:7.1.1"
com-android-asset-pack = "com.android.asset-pack:7.1.1"
com-android-asset-pack-bundle = "com.android.asset-pack-bundle:7.1.1"
com-android-base = "com.android.base:7.1.1"
com-android-dynamic-feature = "com.android.dynamic-feature:7.1.1"
com-android-internal-application = "com.android.internal.application:7.1.1"
com-android-internal-asset-pack = "com.android.internal.asset-pack:7.1.1"
com-android-internal-asset-pack-bundle = "com.android.internal.asset-pack-bundle:7.1.1"
com-android-internal-dynamic-feature = "com.android.internal.dynamic-feature:7.1.1"
com-android-internal-library = "com.android.internal.library:7.1.1"
com-android-internal-reporting = "com.android.internal.reporting:7.1.1"
com-android-internal-test = "com.android.internal.test:7.1.1"
com-android-internal-version-check = "com.android.internal.version-check:7.1.1"
com-android-library = "com.android.library:7.1.1"
com-android-lint = "com.android.lint:7.1.1"
com-android-reporting = "com.android.reporting:7.1.1"
com-android-test = "com.android.test:7.1.1"
com-diffplug-spotless = "com.diffplug.spotless:6.3.0"
kotlin = "kotlin:1.6.10"
kotlin-android = "kotlin-android:1.6.10"
kotlin-android-extensions = "kotlin-android-extensions:1.6.10"
Expand All @@ -62,7 +61,6 @@ kotlin-platform-js = "kotlin-platform-js:1.6.10"
kotlin-platform-jvm = "kotlin-platform-jvm:1.6.10"
kotlin-scripting = "kotlin-scripting:1.6.10"
kotlin2js = "kotlin2js:1.6.10"
nl-littlerobots-version-catalog-update = "nl.littlerobots.version-catalog-update:0.3.0"
org-jetbrains-kotlin-android = "org.jetbrains.kotlin.android:1.6.10"
org-jetbrains-kotlin-android-extensions = "org.jetbrains.kotlin.android.extensions:1.6.10"
org-jetbrains-kotlin-js = "org.jetbrains.kotlin.js:1.6.10"
Expand Down
15 changes: 12 additions & 3 deletions ComposeAdvanced/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,24 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}

// https://docs.gradle.org/7.4/userguide/declaring_dependencies.html#sec:type-safe-project-accessors
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}

rootProject.name = "ComposeAdvanced"
include ":app"

// https://docs.gradle.org/7.4/userguide/declaring_dependencies.html#sec:type-safe-project-accessors
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")

0 comments on commit f375a8b

Please sign in to comment.