Skip to content

Commit

Permalink
Update gradle and resources
Browse files Browse the repository at this point in the history
  • Loading branch information
Gitsaibot authored and Gitsaibot committed May 11, 2023
1 parent 06f6ec0 commit 772f933
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 20 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Android CI with Gradle

on:
pull_request:
branches: [ master ]
push:
workflow_dispatch:

jobs:
build:
Expand All @@ -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
Expand All @@ -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
28 changes: 18 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -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'] + "\"")
Expand All @@ -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'
Expand Down
1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.gitsaibot.af"
android:installLocation="internalOnly">

<uses-permission android:name="android.permission.INTERNET" />
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 772f933

Please sign in to comment.