From c81fd5e39bacea5fd4a51a46236f5881f17f9ba0 Mon Sep 17 00:00:00 2001 From: Yuichi Araki Date: Wed, 14 Feb 2024 12:19:05 +0900 Subject: [PATCH 1/2] Enable GitHub Actions Change-Id: I3bacf40947b2f80543ed28c460d3f7e3c8439681 --- .github/workflows/build.yml | 39 +++++++++++++++++++ .gitignore | 1 + .../android/samples/socialite/ui/Main.kt | 5 +-- .../android/samples/socialite/ui/home/Home.kt | 1 + gradle/libs.versions.toml | 2 +- 5 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..fcf04590 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,39 @@ +name: Pull Request + +on: + pull_request: + types: [ opened, synchronize, reopened ] + +permissions: + contents: write + actions: read + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 60 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Validate Gradle Wrapper + uses: gradle/wrapper-validation-action@v2 + + - name: Setup JDK + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 17 + + - name: Setup Gradle + uses: gradle/gradle-build-action@v3 + + - name: Check spotless + run: ./gradlew spotlessCheck + + - name: Build App + run: ./gradlew assembleDebug + + - name: Lint + run: ./gradlew lintDebug diff --git a/.gitignore b/.gitignore index 2faa844e..ea8c8d29 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ /.idea/navEditor.xml /.idea/assetWizardSettings.xml /.idea/deploymentTargetDropDown.xml +/.idea/deploymentTargetSelector.xml /.idea/misc.xml /.idea/migrations.xml /.idea/gradle.xml diff --git a/app/src/main/java/com/google/android/samples/socialite/ui/Main.kt b/app/src/main/java/com/google/android/samples/socialite/ui/Main.kt index 741d3819..5a211093 100644 --- a/app/src/main/java/com/google/android/samples/socialite/ui/Main.kt +++ b/app/src/main/java/com/google/android/samples/socialite/ui/Main.kt @@ -26,7 +26,6 @@ import androidx.compose.animation.core.tween import androidx.compose.animation.fadeIn import androidx.compose.animation.fadeOut import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.material3.Surface import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext @@ -55,9 +54,7 @@ fun Main( ) { val modifier = Modifier.fillMaxSize() SocialTheme { - Surface(modifier = modifier) { - MainNavigation(modifier, shortcutParams) - } + MainNavigation(modifier, shortcutParams) } } diff --git a/app/src/main/java/com/google/android/samples/socialite/ui/home/Home.kt b/app/src/main/java/com/google/android/samples/socialite/ui/home/Home.kt index a5960938..5db2f6ed 100644 --- a/app/src/main/java/com/google/android/samples/socialite/ui/home/Home.kt +++ b/app/src/main/java/com/google/android/samples/socialite/ui/home/Home.kt @@ -64,6 +64,7 @@ fun Home( onDestinationChanged = { destination = it }, ) }, + containerColor = Color.Transparent, ) { innerPadding -> val navController = rememberNavController() HomeBackground(modifier = Modifier.fillMaxSize()) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 097fdfb5..e1c01c44 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -15,7 +15,7 @@ [versions] accompanist = "0.32.0" activity = "1.9.0-alpha01" -agp = "8.2.1" +agp = "8.2.2" benchmarkMacroJunit4 = "1.2.2" baselineprofile = "1.2.2" camera = "1.3.1" From 6cfabfc65aeb21903b76af55c7ce215cbcb68dee Mon Sep 17 00:00:00 2001 From: Yuichi Araki Date: Wed, 14 Feb 2024 12:46:42 +0900 Subject: [PATCH 2/2] Exclude lintDebug from CI for now Change-Id: I4023799cab81108a85bcbc5e989a7c8f0d903f3b --- .github/workflows/build.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fcf04590..3d0529e3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,4 @@ jobs: run: ./gradlew spotlessCheck - name: Build App - run: ./gradlew assembleDebug - - - name: Lint - run: ./gradlew lintDebug + run: ./gradlew :app:assembleDebug