diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 45ab0c7..1560a6b 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -2,7 +2,8 @@ name: Android CI with Gradle on: pull_request: - branches: [ master ] + push: + workflow_dispatch: jobs: build: @@ -11,14 +12,14 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 - - name: set up JDK 11 - uses: actions/setup-java@v2.3.0 + uses: actions/checkout@v3 + - name: set up JDK 17 + uses: actions/setup-java@v3.10.0 with: distribution: 'zulu' - java-version: '11' + java-version: '17' - name: Restore Cache - uses: actions/cache@v2 + uses: actions/cache@v3.2.6 with: path: | ~/.gradle/caches @@ -31,7 +32,7 @@ jobs: - name: Build with Gradle run: ./gradlew build - name: Upload APK - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: AF-Weather-Widget_apk path: /home/runner/work/AF-Weather-Widget/AF-Weather-Widget/app/build/outputs/apk/debug/**.apk diff --git a/app/build.gradle b/app/build.gradle index cd58353..e778ca1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,18 +1,20 @@ -apply plugin: 'com.android.application' +plugins { + id 'com.android.application' +} def keyProperties = new Properties() keyProperties.load(new FileInputStream(project.rootProject.file("key.properties"))) android { - compileSdkVersion 32 - buildToolsVersion '32.0.0' + namespace 'net.gitsaibot.af' + compileSdk 33 defaultConfig { applicationId "net.gitsaibot.af" - minSdkVersion 21 - targetSdkVersion 32 - versionCode 9 - versionName '1.8' + minSdk 21 + targetSdk 33 + versionCode 10 + versionName '1.9' buildConfigField("String", "USER_AGENT", "\"" + keyProperties['user_agent'] + "\"") buildConfigField("String", "API_KEY", "\"" + keyProperties['apiKey'] + "\"") buildConfigField("String", "USER_GEONAMES", "\"" + keyProperties['user_geonames'] + "\"") @@ -27,18 +29,24 @@ android { buildFeatures { viewBinding true + buildConfig = true } useLibrary 'org.apache.http.legacy' - lintOptions { + lint { abortOnError false } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } } dependencies { - implementation 'androidx.core:core:1.8.0' - implementation 'androidx.appcompat:appcompat:1.4.2' + implementation 'androidx.core:core:1.9.0' + implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.preference:preference:1.2.0' implementation 'androidx.legacy:legacy-preference-v14:1.0.0' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index baf6d92..219a9bc 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ diff --git a/build.gradle b/build.gradle index 8916589..6e9e358 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.1.3' + classpath 'com.android.tools.build:gradle:8.0.1' } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1cc817d..f157dbb 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Mon Aug 30 15:20:44 CEST 2021 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME