Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable GitHub Actions #21

Merged
merged 2 commits into from
Feb 14, 2024
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
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Pull Request

on:
pull_request:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow could be run on pushing on main branch for better Gradle caching.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be replaced by gradle/actions/setup-gradle@v3, check https://github.com/gradle/gradle-build-action/releases/tag/v3.0.0


- name: Check spotless
run: ./gradlew spotlessCheck

- name: Build App
run: ./gradlew :app:assembleDebug
Comment on lines +35 to +36
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assemble job could be separated into an individual job with much parallelism.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -55,9 +54,7 @@ fun Main(
) {
val modifier = Modifier.fillMaxSize()
SocialTheme {
Surface(modifier = modifier) {
MainNavigation(modifier, shortcutParams)
}
MainNavigation(modifier, shortcutParams)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ fun Home(
onDestinationChanged = { destination = it },
)
},
containerColor = Color.Transparent,
) { innerPadding ->
val navController = rememberNavController()
HomeBackground(modifier = Modifier.fillMaxSize())
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down