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

Add workflow for wrapper check and building ios and android #232

Merged
merged 2 commits into from
Dec 12, 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
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build
on:
pull_request:
push:
branches: [ main ] # Trigger on pushes to the main branch
workflow_dispatch:

jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'corretto'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Setup Android SDK
uses: android-actions/setup-android@v3

- name: Check, Assemble Android and compile iOS
run: ./gradlew ktlintCheck assembleDebug compileKotlinIosX64 --no-daemon
15 changes: 15 additions & 0 deletions .github/workflows/gradle-wrapper.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: gradle-wrapper

on:
pull_request:
paths:
- 'gradlew'
- 'gradlew.bat'
- 'gradle/wrapper/**'

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v4
17 changes: 0 additions & 17 deletions .github/workflows/ktlint.yml

This file was deleted.

7 changes: 7 additions & 0 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,10 @@ dependencies {

coreLibraryDesugaring(libs.android.desugar)
}

// Function that copies `mock` JSON config file for google-services if there isn't one available
// Google-services plugin requires this config file to build
val googleServices = file("google-services.json")
if (!googleServices.exists()) {
file("mock-google-services.json").copyTo(googleServices, overwrite = false)
}
47 changes: 47 additions & 0 deletions android/mock-google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"project_info": {
"project_number": "606665771234",
"project_id": "mock-firebase-project",
"storage_bucket": "mock-firebase-project.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:606665771229:android:c1f0f09aa42abc12",
"android_client_info": {
"package_name": "co.touchlab.droidcon.london"
}
},
"oauth_client": [
{
"client_id": "123455771229-sc9bpuefbjceq7i1qabk7gssstefrdlv.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "co.touchlab.droidcon.london",
"certificate_hash": "7f254b538565cfe6c28a88744985f015b1534980"
}
},
{
"client_id": "123455771229-sc9bpuefbjceq7i1qabk7gssstefrdlv.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCNzhU2a9gMc_JHurHbywOrRI9Vj4VQZZZ"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "413392989754-04u9tv32474rj0pmbfksirt4ti02a64r.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}