diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index b90a451..ececed6 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -49,6 +49,7 @@ jobs: - name: Run Fastlane env: + MODULE: ${{ github.event.inputs.module }} SUPPLY_JSON_KEY: service-account.json KEYSTORE_FILE: upload.jks KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} diff --git a/donext/build.gradle b/donext/build.gradle index c7dc969..740c349 100644 --- a/donext/build.gradle +++ b/donext/build.gradle @@ -42,7 +42,7 @@ dependencies { implementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}" // Lifecycle components - def lifecycleVersion = '2.9.3' + def lifecycleVersion = '2.9.4' implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycleVersion" implementation "androidx.lifecycle:lifecycle-livedata:$lifecycleVersion" implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion" diff --git a/donextv2/build.gradle.kts b/donextv2/build.gradle.kts index bda067d..67b6bdf 100644 --- a/donextv2/build.gradle.kts +++ b/donextv2/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + plugins { id("com.android.application") id("org.jetbrains.kotlin.android") @@ -18,8 +20,8 @@ android { applicationId = "com.wismna.geoffroy.donext" minSdk = 26 targetSdk = 36 - versionCode = 34 - versionName = "2.0" + versionCode = 35 + versionName = "2.0.1" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } @@ -54,8 +56,10 @@ android { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } - kotlinOptions { - jvmTarget = "11" + kotlin { + compilerOptions { + jvmTarget = JvmTarget.JVM_11 + } } buildFeatures { compose = true diff --git a/donextv2/src/main/java/com/wismna/geoffroy/donext/presentation/screen/MenuScreen.kt b/donextv2/src/main/java/com/wismna/geoffroy/donext/presentation/screen/MenuScreen.kt index 398b955..dfa272d 100644 --- a/donextv2/src/main/java/com/wismna/geoffroy/donext/presentation/screen/MenuScreen.kt +++ b/donextv2/src/main/java/com/wismna/geoffroy/donext/presentation/screen/MenuScreen.kt @@ -6,6 +6,8 @@ import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Checklist import androidx.compose.material.icons.filled.Delete @@ -43,7 +45,8 @@ fun MenuScreen( Column( modifier = Modifier .fillMaxHeight() - .padding(vertical = 8.dp), + .padding(vertical = 8.dp) + .verticalScroll(rememberScrollState()), verticalArrangement = Arrangement.SpaceBetween ) { Column { diff --git a/donextv2/src/main/java/com/wismna/geoffroy/donext/presentation/screen/TaskScreen.kt b/donextv2/src/main/java/com/wismna/geoffroy/donext/presentation/screen/TaskScreen.kt index 1f12528..e1b4543 100644 --- a/donextv2/src/main/java/com/wismna/geoffroy/donext/presentation/screen/TaskScreen.kt +++ b/donextv2/src/main/java/com/wismna/geoffroy/donext/presentation/screen/TaskScreen.kt @@ -7,6 +7,8 @@ import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.CalendarMonth import androidx.compose.material.icons.filled.Clear @@ -61,7 +63,7 @@ fun TaskScreen( titleFocusRequester.requestFocus() } - Column(Modifier.padding(16.dp)) { + Column(Modifier.padding(16.dp).verticalScroll(rememberScrollState())) { Text( stringResource( if (viewModel.isDeleted) R.string.task_title_deleted diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 4c72b66..731e443 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -1,23 +1,28 @@ default_platform(:android) platform :android do - desc "Build, test, and deploy the production version to Google Play" - lane :deploy do - gradle(task: "testDebugUnitTest") - gradle(task: "clean :donextv2:bundleRelease") - upload_to_play_store( - track: "production", - aab: "donextv2/build/outputs/bundle/release/donextv2-release.aab" - ) - end - desc "Build, test, and deploy to Google Play" lane :internal do + module_name = ENV["MODULE"] || "donextv2" + # Read local versionCode + gradle_version = get_version_code( + gradle_file_path: "#{module_name}/build.gradle" + ).to_i + + # Read Play Store versionCode (track internal) + play_version = google_play_track_version_codes( + track: "internal" + ).max.to_i + + if gradle_version <= play_version + UI.user_error!("VersionCode #{gradle_version} should be higher than Play Store version (#{play_version}). Aborting upload.") + end + gradle(task: "testDebugUnitTest") - gradle(task: "clean :donextv2:bundleRelease") + gradle(task: "clean :#{module_name}:bundleRelease") upload_to_play_store( track: "internal", - aab: "donextv2/build/outputs/bundle/release/donextv2-release.aab" + aab: "#{module_name}/build/outputs/bundle/release/#{module_name}-release.aab" ) end end \ No newline at end of file