Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/whatsnew/whatsnew-en-US
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Android U (34) support
Predictive back gesture support
Themed app icon updated
Android 15 (35) and 16 (36) support
Removed Android L (21) and L_MR1 (22) support
Bug fixes and performance improvements
12 changes: 6 additions & 6 deletions .github/workflows/android-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ jobs:
needs: [ tests ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5
- name: Cache gradle
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: set up JDK 17
uses: actions/setup-java@v3
- name: set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '17'
java-version: '21'
distribution: 'adopt'
cache: 'gradle'
- name: Grant execute permission for gradlew
Expand All @@ -44,7 +44,7 @@ jobs:
alias: ${{ secrets.KEYSTORE_ALIAS }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "34.0.0"
BUILD_TOOLS_VERSION: "36.0.0"
- name: Deploy Bundle to Play Store
uses: r0adkll/upload-google-play@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
contents: write
if: ${{ github.ref == 'refs/heads/master' }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
Expand Down
25 changes: 13 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,22 @@ jobs:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5
- name: Cache gradle
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: set up JDK 17
uses: actions/setup-java@v3
- name: set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '17'
java-version: '21'
distribution: 'adopt'
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Unit tests
Expand All @@ -36,20 +37,20 @@ jobs:
contents: 'read'
id-token: 'write'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5
- name: Cache gradle
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: set up JDK 17
uses: actions/setup-java@v3
- name: set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '17'
java-version: '21'
distribution: 'adopt'
cache: 'gradle'
- name: Grant execute permission for gradlew
Expand All @@ -58,11 +59,11 @@ jobs:
run: ./gradlew bundleDebug assembleDebugAndroidTest --stacktrace
- id: auth
name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ secrets.GC_PROVIDER_NAME }}
service_account: ${{ secrets.GC_SA_EMAIL }}
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
uses: google-github-actions/setup-gcloud@v2
- name: Instrumentation Tests
run: 'gcloud firebase test android run --type instrumentation --app app/build/outputs/bundle/debug/app-debug.aab --test app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk --device model=panther,version=33 --timeout 30m --no-auto-google-login --num-flaky-test-attempts=1'
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ captures/
.idea/androidTestResultsUserPreferences.xml
.idea/migrations.xml
.idea/runConfigurations/
.idea/deploymentTargetSelector.xml
.idea/AndroidProjectSystem.xml
.idea/deviceManager.xml
.kotlin/
*.iml
.run/

Expand Down
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ This is a repository for the Device Info Android app that displays specific info

## Build Tools

* Android Studio Hedgehog (Gradle 8.2)
* Android Studio Narwhal Feature Drop (Gradle 4.0-8.12)
* AndroidX/Jetpack
* Android 5.0 (API 21) or above (built against 14/API 34)
* Kotlin 1.9
* Android 6.0 (API 23) or above (built against 16/API 36)
* Kotlin 2.2

## Android Permissions

Expand Down
144 changes: 69 additions & 75 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import java.util.Properties

plugins {
Expand All @@ -6,16 +7,17 @@ plugins {
id("com.google.devtools.ksp")
id("kotlin-parcelize")
id("dagger.hilt.android.plugin")
alias(libs.plugins.compose.compiler)
}

android {
namespace = "com.cwlarson.deviceid"
compileSdk = 34
compileSdk = 36
defaultConfig {
minSdk = 21
targetSdk = 34
versionCode = 18
versionName = "1.5.1"
minSdk = 23
targetSdk = 36
versionCode = 19
versionName = "1.6.0"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner = "com.cwlarson.deviceid.CustomTestRunner"
}
Expand Down Expand Up @@ -50,102 +52,94 @@ android {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString()
composeOptions.kotlinCompilerExtensionVersion = "1.5.5"
kotlin.compilerOptions {
jvmTarget = JvmTarget.fromTarget("17")
optIn.add("kotlinx.coroutines.ExperimentalCoroutinesApi")
}
testOptions {
animationsDisabled = true
unitTests.isIncludeAndroidResources = true
unitTests.all { it.jvmArgs("-Xmx2g") }
kotlinOptions.freeCompilerArgs +=
listOf("-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi")
}
packagingOptions.resources.merges.addAll(
listOf("META-INF/LICENSE.md", "META-INF/LICENSE-notice.md")
)
testBuildType = "debug"
}

val coroutinesBom: Dependency = dependencies.platform("org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.7.3")
val hiltVersion: String by rootProject.extra
val lifecycleVersion = "2.6.2"
val composeBom: Dependency = dependencies.platform("androidx.compose:compose-bom:2023.10.01")
val composeAccompanistVersion = "0.32.0"
val datastoreVersion = "1.0.0"
val mockkVersion = "1.13.8"
dependencies {
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
implementation(coroutinesBom)
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android")
implementation("com.google.android.material:material:1.10.0")
implementation("androidx.webkit:webkit:1.9.0")
implementation("androidx.datastore:datastore:$datastoreVersion")
implementation("androidx.datastore:datastore-preferences:$datastoreVersion")
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.core:core-splashscreen:1.0.1")
implementation(platform(libs.kotlinx.coroutines.bom))
implementation(libs.kotlinx.coroutines.android)
implementation(libs.material)
implementation(libs.androidx.webkit)
implementation(libs.androidx.datastore)
implementation(libs.androidx.datastore.preferences)
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.core.splashscreen)
// Compose
implementation(composeBom)
implementation("androidx.activity:activity-compose:1.8.1")
implementation("androidx.compose.ui:ui")
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.ui)
// Tooling support (Previews, etc.)
debugImplementation("androidx.compose.ui:ui-tooling")
implementation("androidx.compose.ui:ui-tooling-preview")
debugImplementation(libs.androidx.ui.tooling)
implementation(libs.androidx.ui.tooling.preview)
// Foundation (Border, Background, Box, Image, Scroll, shapes, animations, etc.)
implementation("androidx.compose.foundation:foundation")
implementation(libs.androidx.foundation)
// Material Design
implementation("androidx.compose.material:material")
implementation("androidx.compose.material3:material3")
implementation("androidx.compose.material3:material3-window-size-class")
implementation("androidx.compose.ui:ui-text-google-fonts")
implementation(libs.androidx.material)
implementation(libs.androidx.material3)
implementation(libs.androidx.material3.window.size)
implementation(libs.androidx.ui.google.fonts)
// Material design icons
implementation("androidx.compose.material:material-icons-core")
implementation("androidx.compose.material:material-icons-extended")
implementation(libs.androidx.material.icons.core)
implementation(libs.androidx.material.icons.extended)
// Compose Accompanist
implementation("com.google.accompanist:accompanist-systemuicontroller:$composeAccompanistVersion")
implementation("com.google.accompanist:accompanist-permissions:$composeAccompanistVersion")
implementation(libs.accompanist.permissions)
// Lifecycle
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion")
implementation("androidx.lifecycle:lifecycle-process:$lifecycleVersion")
implementation("androidx.lifecycle:lifecycle-viewmodel-savedstate:$lifecycleVersion")
implementation("androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycleVersion")
implementation("androidx.lifecycle:lifecycle-runtime-compose:$lifecycleVersion")
implementation(libs.androidx.lifecycle.viewmodel.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.lifecycle.process)
implementation(libs.androidx.lifecycle.viewmodel.savedstate)
implementation(libs.androidx.lifecycle.common.java8)
implementation(libs.androidx.lifecycle.viewmodel.compose)
implementation(libs.androidx.lifecycle.runtime.compose)
//Navigation
implementation("androidx.navigation:navigation-compose:2.7.5")
implementation(libs.androidx.navigation.compose)
// Google Play App Updates
implementation("com.google.android.play:app-update-ktx:2.1.0")
implementation(libs.app.update.ktx)
// Timber
implementation("com.jakewharton.timber:timber:5.0.1")
implementation(libs.timber)
// Hilt
implementation("com.google.dagger:hilt-android:$hiltVersion")
implementation("androidx.hilt:hilt-navigation-compose:1.1.0")
ksp("com.google.dagger:hilt-android-compiler:$hiltVersion")
androidTestImplementation("com.google.dagger:hilt-android-testing:$hiltVersion")
kspAndroidTest("com.google.dagger:hilt-android-compiler:$hiltVersion")
implementation(libs.hilt.android)
implementation(libs.androidx.hilt.navigation.compose)
ksp(libs.hilt.compiler)
androidTestImplementation(libs.hilt.android.testing)
kspAndroidTest(libs.hilt.android.compiler)
// Instrumentation Testing
androidTestImplementation("androidx.test:core-ktx:1.5.0")
androidTestImplementation("androidx.test:runner:1.5.2")
androidTestImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test")
androidTestImplementation(composeBom)
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
debugImplementation("androidx.compose.ui:ui-test-manifest")
androidTestImplementation("io.mockk:mockk-android:$mockkVersion")
androidTestImplementation("io.mockk:mockk-agent:$mockkVersion")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
androidTestImplementation("androidx.test.espresso:espresso-intents:3.5.1")
androidTestImplementation("androidx.test.uiautomator:uiautomator:2.2.0")
androidTestImplementation(libs.core.ktx)
androidTestImplementation(libs.androidx.runner)
androidTestImplementation(libs.jetbrains.kotlinx.coroutines.test)
androidTestImplementation(platform(libs.androidx.compose.bom))
androidTestImplementation(libs.androidx.ui.test.junit4)
debugImplementation(libs.androidx.ui.test.manifest)
androidTestImplementation(libs.mockk.android)
androidTestImplementation(libs.mockk.agent)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(libs.androidx.espresso.intents)
androidTestImplementation(libs.androidx.uiautomator)
// Unit Testing
testImplementation("junit:junit:4.13.2")
testImplementation("io.mockk:mockk-android:$mockkVersion")
testImplementation("io.mockk:mockk-agent:$mockkVersion")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test")
testImplementation("app.cash.turbine:turbine:1.0.0")
testImplementation(composeBom)
testImplementation("androidx.compose.ui:ui-test-junit4")
testImplementation(libs.junit)
testImplementation(libs.mockk.android)
testImplementation(libs.mockk.agent)
testImplementation(libs.jetbrains.kotlinx.coroutines.test)
testImplementation(libs.turbine)
testImplementation(platform(libs.androidx.compose.bom))
testImplementation(libs.androidx.ui.test.junit4)
// Robolectric Testing
testImplementation("org.robolectric:robolectric:4.11")
testImplementation("androidx.test.ext:junit-ktx:1.1.5")
testImplementation("androidx.test:rules:1.5.0")
testImplementation(libs.robolectric)
testImplementation(libs.androidx.junit.ktx)
testImplementation(libs.androidx.rules)
// LeakCanary
debugImplementation("com.squareup.leakcanary:leakcanary-android:2.12")
debugImplementation(libs.leakcanary.android)
}
Loading