Skip to content

Commit

Permalink
build sample apps
Browse files Browse the repository at this point in the history
  • Loading branch information
mrehan27 committed Apr 18, 2024
1 parent a84d9e8 commit c3913e2
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 7 deletions.
41 changes: 35 additions & 6 deletions .github/workflows/gradle-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,46 @@ on: [push]

jobs:
gradle-compatibility-builds:
name: Build with Gradle ${{ matrix.gradle-version }}
name: ${{ matrix.sample-app }} build with AGP ${{ matrix.agp-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
agp-version: ["6.1.1", "7.4.0", "8.3.1"]
include:
- agp-version: "6.1.1"
gradle-version: "6.8"
sample-app: "java_layout"
cio-siteid-secret-key: "CUSTOMERIO_JAVA_WORKSPACE_SITE_ID"
cio-apikey-secret-key: "CUSTOMERIO_JAVA_WORKSPACE_API_KEY"
- agp-version: "6.1.1"
gradle-version: "6.8"
sample-app: "kotlin_compose"
cio-siteid-secret-key: "CUSTOMERIO_KOTLIN_WORKSPACE_SITE_ID"
cio-apikey-secret-key: "CUSTOMERIO_KOTLIN_WORKSPACE_API_KEY"
- agp-version: "7.4.0"
gradle-version: "7.2"
sample-app: "java_layout"
cio-siteid-secret-key: "CUSTOMERIO_JAVA_WORKSPACE_SITE_ID"
cio-apikey-secret-key: "CUSTOMERIO_JAVA_WORKSPACE_API_KEY"
- agp-version: "7.4.0"
gradle-version: "7.2"
sample-app: "kotlin_compose"
cio-siteid-secret-key: "CUSTOMERIO_KOTLIN_WORKSPACE_SITE_ID"
cio-apikey-secret-key: "CUSTOMERIO_KOTLIN_WORKSPACE_API_KEY"
- agp-version: "8.3.1"
gradle-version: "8.4"
sample-app: "java_layout"
cio-siteid-secret-key: "CUSTOMERIO_JAVA_WORKSPACE_SITE_ID"
cio-apikey-secret-key: "CUSTOMERIO_JAVA_WORKSPACE_API_KEY"
- agp-version: "8.3.1"
gradle-version: "8.4"
sample-app: "kotlin_compose"
cio-siteid-secret-key: "CUSTOMERIO_KOTLIN_WORKSPACE_SITE_ID"
cio-apikey-secret-key: "CUSTOMERIO_KOTLIN_WORKSPACE_API_KEY"

steps:
- uses: actions/checkout@v4

- uses: actions/cache@v3
with:
path: |
Expand All @@ -38,6 +62,13 @@ jobs:
- name: Install Android SDK
uses: android-actions/setup-android@v3

- name: Setup local.properties file for sample app
run: |
touch "samples/local.properties"
echo "sdkVersion=3.10.0" >> "samples/local.properties"
echo "siteId=${{ secrets[matrix.cio-siteid-secret-key] }}" >> "samples/local.properties"
echo "apiKey=${{ secrets[matrix.cio-apikey-secret-key] }}" >> "samples/local.properties"
- name: Verify gradle scripts are valid gradle scripts
uses: gradle/actions/wrapper-validation@v3

Expand All @@ -50,7 +81,5 @@ jobs:
run: |
sed -i "s/gradle-.*-all.zip/gradle-${{ matrix.gradle-version }}-all.zip/g" gradle/wrapper/gradle-wrapper.properties
- name: Build and Test SDK with Gradle Version ${{ matrix.gradle-version }}
run: ./gradlew build -PAGP_VERSION=${{ matrix.agp-version }}
env:
IS_DEVELOPMENT: "true"
- name: Build Sample App ${{ matrix.sample-app }} with Gradle Version ${{ matrix.gradle-version }}
run: gradle assembleRelease
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ buildscript {
}
dependencies {
classpath "com.android.tools.build:gradle:$agpVersion"
classpath Dependencies.androidGradlePlugin
classpath Dependencies.kotlinGradlePlugin
classpath Dependencies.kotlinBinaryValidator
classpath Dependencies.gradleNexusPublishPlugin
Expand Down

0 comments on commit c3913e2

Please sign in to comment.