From 9647f15c19f609600d536107f40c66e6e8c3e88e Mon Sep 17 00:00:00 2001 From: ArchieMeng Date: Fri, 23 Feb 2024 16:42:11 +0800 Subject: [PATCH] Add build workflow and update gradle files --- .github/workflows/build.yml | 28 ++++++++++++++++++++++++ build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 3 files changed, 30 insertions(+), 2 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 0000000..481bd35 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,28 @@ +name: Android CI + +on: + push: + branches: [ "core" ] + pull_request: + branches: [ "core" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + cache: gradle + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew build + - name: Build debug apk + run: bash ./gradlew assembleDebug --stacktrace + diff --git a/build.gradle b/build.gradle index eb4d714..0b630f2 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:7.2.1' + classpath 'com.android.tools.build:gradle:8.1.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d47d36b..2f875df 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip