Skip to content

Commit

Permalink
Merge of compose-Latest changes into main (#1444)
Browse files Browse the repository at this point in the history
- Including updates such as Shared element transitions
- Migrating Jetsnack to Material3
  • Loading branch information
riggaroo committed Aug 14, 2024
2 parents ee8e272 + 9996d5e commit 86aadeb
Show file tree
Hide file tree
Showing 80 changed files with 1,825 additions and 1,273 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/JetNews.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

Expand All @@ -60,7 +64,6 @@ jobs:
~/.gradle/caches/jars-*
~/.gradle/caches/build-cache-*
key: gradle-${{ hashFiles('checksum.txt') }}

- name: Run instrumentation tests
uses: reactivecircus/android-emulator-runner@v2
with:
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,6 @@ jobs:
draft: true
prerelease: false

- name: Upload Crane
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Crane/app/build/outputs/apk/debug/app-debug.apk
asset_name: crane-debug.apk
asset_content_type: application/vnd.android.package-archive

- name: Upload Owl
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Owl/app/build/outputs/apk/debug/app-debug.apk
asset_name: owl-debug.apk
asset_content_type: application/vnd.android.package-archive

- name: Upload Jetcaster
uses: actions/upload-release-asset@v1
env:
Expand Down Expand Up @@ -99,13 +79,3 @@ jobs:
asset_path: Jetsnack/app/build/outputs/apk/debug/app-debug.apk
asset_name: jetsnack-debug.apk
asset_content_type: application/vnd.android.package-archive

- name: Upload Jetsurvey
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Jetsurvey/app/build/outputs/apk/debug/app-debug.apk
asset_name: jetsurvey-debug.apk
asset_content_type: application/vnd.android.package-archive
6 changes: 5 additions & 1 deletion .github/workflows/build-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ jobs:
- name: Build debug
working-directory: ${{ inputs.path }}
run: ./gradlew assembleDebug --stacktrace

- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Run local tests
working-directory: ${{ inputs.path }}
run: ./gradlew testDebug --stacktrace
Expand Down
41 changes: 0 additions & 41 deletions .github/workflows/main.yml

This file was deleted.

1 change: 0 additions & 1 deletion JetLagged/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ dependencies {
implementation(libs.androidx.lifecycle.runtime.compose)
implementation(libs.androidx.navigation.compose)
implementation(libs.androidx.constraintlayout.compose)
implementation(libs.google.android.material)

implementation(libs.androidx.compose.runtime)
implementation(libs.androidx.compose.foundation)
Expand Down
2 changes: 1 addition & 1 deletion JetLagged/app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
the License.
-->
<resources>
<style name="Theme.JetLagged" parent="Theme.MaterialComponents.DayNight"/>
<style name="Theme.JetLagged" parent="android:Theme.Material.Light.NoActionBar"/>
</resources>
34 changes: 17 additions & 17 deletions JetLagged/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,22 @@
#####
[versions]
accompanist = "0.34.0"
androidGradlePlugin = "8.5.1"
androidGradlePlugin = "8.5.0"
androidx-activity-compose = "1.9.0"
androidx-appcompat = "1.7.0"
androidx-benchmark = "1.2.4"
androidx-benchmark-junit4 = "1.2.4"
androidx-compose-bom = "2024.06.00"
androidx-compose-material3 = "1.3.0-beta04"
androidx-compose-latest = "1.7.0-beta07"
androidx-compose-material3 = "1.3.0-beta05"
androidx-compose-material3-adaptive = "1.0.0-beta04"
androidx-constraintlayout = "1.0.1"
androidx-constraintlayout = "1.1.0-alpha13"
androidx-core-splashscreen = "1.0.1"
androidx-corektx = "1.13.1"
androidx-glance = "1.1.0"
androidx-lifecycle = "2.8.2"
androidx-lifecycle-compose = "2.6.1"
androidx-lifecycle-runtime-compose = "2.6.1"
androidx-navigation = "2.7.7"
androidx-palette = "1.0.0"
androidx-test = "1.5.0"
Expand Down Expand Up @@ -45,7 +48,6 @@ kotlin = "2.0.0"
kotlinx_immutable = "0.3.7"
ksp = "2.0.0-1.0.21"
maps-compose = "3.1.1"
material = "1.11.0"
# @keep
minSdk = "21"
okhttp = "4.11.0"
Expand All @@ -56,7 +58,7 @@ rome = "1.18.0"
room = "2.6.0"
secrets = "2.0.1"
# @keep
targetSdk = "34"
targetSdk = "33"
version-catalog-update = "0.8.4"

[libraries]
Expand All @@ -71,11 +73,10 @@ androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
androidx-benchmark-macrobenchmark = { module = "androidx.benchmark:benchmark-macro", version.ref = "androidx-benchmark" }
androidx-benchmark-macrobenchmark-junit4 = { module = "androidx.benchmark:benchmark-macro-junit4", version.ref = "androidx-benchmark-junit4" }
androidx-compose-animation = { module = "androidx.compose.animation:animation" }
androidx-compose-animation = { module = "androidx.compose.animation:animation", version.ref = "androidx-compose-latest" }
androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "androidx-compose-bom" }
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation" }
androidx-compose-foundation-layout = { module = "androidx.compose.foundation:foundation-layout" }
androidx-compose-material = { module = "androidx.compose.material:material" }
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "androidx-compose-latest"}
androidx-compose-foundation-layout = { module = "androidx.compose.foundation:foundation-layout" ,version.ref = "androidx-compose-latest"}
androidx-compose-material-iconsExtended = { module = "androidx.compose.material:material-icons-extended" }
androidx-compose-material3 = { module = "androidx.compose.material3:material3" }
androidx-compose-material3-adaptive = { module = "androidx.compose.material3.adaptive:adaptive", version.ref = "androidx-compose-material3-adaptive" }
Expand All @@ -85,7 +86,7 @@ androidx-compose-material3-adaptive-navigationSuite = { module = "androidx.compo
androidx-compose-materialWindow = { module = "androidx.compose.material3:material3-window-size-class" }
androidx-compose-runtime = { module = "androidx.compose.runtime:runtime" }
androidx-compose-runtime-livedata = { module = "androidx.compose.runtime:runtime-livedata" }
androidx-compose-ui = { module = "androidx.compose.ui:ui" }
androidx-compose-ui = { module = "androidx.compose.ui:ui" , version.ref = "androidx-compose-latest"}
androidx-compose-ui-googlefonts = { module = "androidx.compose.ui:ui-text-google-fonts" }
androidx-compose-ui-graphics = { module = "androidx.compose.ui:ui-graphics" }
androidx-compose-ui-test = { module = "androidx.compose.ui:ui-test" }
Expand All @@ -103,12 +104,12 @@ androidx-glance = { module = "androidx.glance:glance", version.ref = "androidx-g
androidx-glance-appwidget = { module = "androidx.glance:glance-appwidget", version.ref = "androidx-glance" }
androidx-glance-material3 = { module = "androidx.glance:glance-material3", version.ref = "androidx-glance" }
androidx-hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "androidxHiltNavigationCompose" }
androidx-lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle" }
androidx-lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidx-lifecycle" }
androidx-lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "androidx-lifecycle" }
androidx-lifecycle-viewModelCompose = { 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" }
androidx-lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle-compose" }
androidx-lifecycle-runtime ={ module= "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidx-lifecycle-compose"}
androidx-lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "androidx-lifecycle-runtime-compose" }
androidx-lifecycle-viewModelCompose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "androidx-lifecycle-compose" }
androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle-compose" }
androidx-lifecycle-viewmodel-savedstate = { module = "androidx.lifecycle:lifecycle-viewmodel-savedstate", version.ref = "androidx-lifecycle-compose" }
androidx-material-icons-core = { module = "androidx.compose.material:material-icons-core" }
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "androidx-navigation" }
androidx-navigation-fragment = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "androidx-navigation" }
Expand All @@ -135,7 +136,6 @@ androidx-window-core = { module = "androidx.window:window-core", version.ref = "
coil-kt-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" }
core-jdk-desugaring = { module = "com.android.tools:desugar_jdk_libs", version.ref = "jdkDesugar" }
dagger-hiltandroidplugin = { module = "com.google.dagger:hilt-android-gradle-plugin", version.ref = "hilt" }
google-android-material = { module = "com.google.android.material:material", version.ref = "material" }
googlemaps-compose = { module = "com.google.maps.android:maps-compose", version.ref = "maps-compose" }
googlemaps-maps = { module = "com.google.android.gms:play-services-maps", version.ref = "google-maps" }
hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hilt" }
Expand Down
6 changes: 4 additions & 2 deletions JetNews/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ composeCompiler {
enableStrongSkippingMode = true
}

kotlin {
jvmToolchain(17)
}

dependencies {
val composeBom = platform(libs.androidx.compose.bom)
implementation(composeBom)
Expand Down Expand Up @@ -137,8 +141,6 @@ dependencies {
implementation(libs.androidx.navigation.compose)
implementation(libs.androidx.window)

implementation(libs.google.android.material)

androidTestImplementation(libs.junit)
androidTestImplementation(libs.androidx.test.core)
androidTestImplementation(libs.androidx.test.runner)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class JetnewsTests {
useUnmergedTree = true
).performClick()
composeTestRule.onNodeWithText("Interests").performClick()
composeTestRule.onNodeWithText("Topics").assertExists()
// TODO - this fails on CI but not locally. (https://github.com/android/compose-samples/issues/1442)
// composeTestRule.waitUntilAtLeastOneExists(hasText("Topics"), 5000L)
}
}
32 changes: 16 additions & 16 deletions JetNews/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ androidx-appcompat = "1.7.0"
androidx-benchmark = "1.2.4"
androidx-benchmark-junit4 = "1.2.4"
androidx-compose-bom = "2024.06.00"
androidx-compose-material3 = "1.3.0-beta01"
androidx-compose-material3-adaptive = "1.0.0-beta01"
androidx-constraintlayout = "1.0.1"
androidx-compose-latest = "1.7.0-beta07"
androidx-compose-material3 = "1.3.0-beta05"
androidx-compose-material3-adaptive = "1.0.0-beta04"
androidx-constraintlayout = "1.1.0-alpha13"
androidx-core-splashscreen = "1.0.1"
androidx-corektx = "1.13.1"
androidx-glance = "1.1.0"
androidx-lifecycle = "2.8.2"
androidx-lifecycle-compose = "2.6.1"
androidx-lifecycle-runtime-compose = "2.6.1"
androidx-navigation = "2.7.7"
androidx-palette = "1.0.0"
androidx-test = "1.5.0"
Expand Down Expand Up @@ -45,7 +48,6 @@ kotlin = "2.0.0"
kotlinx_immutable = "0.3.7"
ksp = "2.0.0-1.0.21"
maps-compose = "3.1.1"
material = "1.11.0"
# @keep
minSdk = "21"
okhttp = "4.11.0"
Expand All @@ -71,11 +73,10 @@ androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
androidx-benchmark-macrobenchmark = { module = "androidx.benchmark:benchmark-macro", version.ref = "androidx-benchmark" }
androidx-benchmark-macrobenchmark-junit4 = { module = "androidx.benchmark:benchmark-macro-junit4", version.ref = "androidx-benchmark-junit4" }
androidx-compose-animation = { module = "androidx.compose.animation:animation" }
androidx-compose-animation = { module = "androidx.compose.animation:animation", version.ref = "androidx-compose-latest" }
androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "androidx-compose-bom" }
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation" }
androidx-compose-foundation-layout = { module = "androidx.compose.foundation:foundation-layout" }
androidx-compose-material = { module = "androidx.compose.material:material" }
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "androidx-compose-latest"}
androidx-compose-foundation-layout = { module = "androidx.compose.foundation:foundation-layout" ,version.ref = "androidx-compose-latest"}
androidx-compose-material-iconsExtended = { module = "androidx.compose.material:material-icons-extended" }
androidx-compose-material3 = { module = "androidx.compose.material3:material3" }
androidx-compose-material3-adaptive = { module = "androidx.compose.material3.adaptive:adaptive", version.ref = "androidx-compose-material3-adaptive" }
Expand All @@ -85,7 +86,7 @@ androidx-compose-material3-adaptive-navigationSuite = { module = "androidx.compo
androidx-compose-materialWindow = { module = "androidx.compose.material3:material3-window-size-class" }
androidx-compose-runtime = { module = "androidx.compose.runtime:runtime" }
androidx-compose-runtime-livedata = { module = "androidx.compose.runtime:runtime-livedata" }
androidx-compose-ui = { module = "androidx.compose.ui:ui" }
androidx-compose-ui = { module = "androidx.compose.ui:ui" , version.ref = "androidx-compose-latest"}
androidx-compose-ui-googlefonts = { module = "androidx.compose.ui:ui-text-google-fonts" }
androidx-compose-ui-graphics = { module = "androidx.compose.ui:ui-graphics" }
androidx-compose-ui-test = { module = "androidx.compose.ui:ui-test" }
Expand All @@ -103,12 +104,12 @@ androidx-glance = { module = "androidx.glance:glance", version.ref = "androidx-g
androidx-glance-appwidget = { module = "androidx.glance:glance-appwidget", version.ref = "androidx-glance" }
androidx-glance-material3 = { module = "androidx.glance:glance-material3", version.ref = "androidx-glance" }
androidx-hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "androidxHiltNavigationCompose" }
androidx-lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle" }
androidx-lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidx-lifecycle" }
androidx-lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "androidx-lifecycle" }
androidx-lifecycle-viewModelCompose = { 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" }
androidx-lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle-compose" }
androidx-lifecycle-runtime ={ module= "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidx-lifecycle-compose"}
androidx-lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "androidx-lifecycle-runtime-compose" }
androidx-lifecycle-viewModelCompose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "androidx-lifecycle-compose" }
androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle-compose" }
androidx-lifecycle-viewmodel-savedstate = { module = "androidx.lifecycle:lifecycle-viewmodel-savedstate", version.ref = "androidx-lifecycle-compose" }
androidx-material-icons-core = { module = "androidx.compose.material:material-icons-core" }
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "androidx-navigation" }
androidx-navigation-fragment = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "androidx-navigation" }
Expand All @@ -135,7 +136,6 @@ androidx-window-core = { module = "androidx.window:window-core", version.ref = "
coil-kt-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" }
core-jdk-desugaring = { module = "com.android.tools:desugar_jdk_libs", version.ref = "jdkDesugar" }
dagger-hiltandroidplugin = { module = "com.google.dagger:hilt-android-gradle-plugin", version.ref = "hilt" }
google-android-material = { module = "com.google.android.material:material", version.ref = "material" }
googlemaps-compose = { module = "com.google.maps.android:maps-compose", version.ref = "maps-compose" }
googlemaps-maps = { module = "com.google.android.gms:play-services-maps", version.ref = "google-maps" }
hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hilt" }
Expand Down
4 changes: 3 additions & 1 deletion Jetcaster/core/data-testing/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}
}

kotlin {
jvmToolchain(17)
}
dependencies {
implementation(libs.androidx.core.ktx)
implementation(projects.core.data)
Expand Down
4 changes: 3 additions & 1 deletion Jetcaster/core/data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}
}

kotlin {
jvmToolchain(17)
}
dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
Expand Down
4 changes: 3 additions & 1 deletion Jetcaster/core/designsystem/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}
}

kotlin {
jvmToolchain(17)
}
composeCompiler {
enableStrongSkippingMode = true
}
Expand Down
4 changes: 3 additions & 1 deletion Jetcaster/core/domain-testing/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}
}

kotlin {
jvmToolchain(17)
}
dependencies {
implementation(projects.core.domain)

Expand Down
4 changes: 3 additions & 1 deletion Jetcaster/core/domain/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}
}

kotlin {
jvmToolchain(17)
}
dependencies {
coreLibraryDesugaring(libs.core.jdk.desugaring)
implementation(projects.core.data)
Expand Down
Loading

0 comments on commit 86aadeb

Please sign in to comment.