Skip to content

Commit

Permalink
Merge pull request #16 from devmil/feature/adapt_to_new_target_sdk
Browse files Browse the repository at this point in the history
bump target sdk version to 33
  • Loading branch information
devmil committed Aug 26, 2023
2 parents 0977149 + 669bbc5 commit 7fc1bfb
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: set up JDK 11
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
cache: gradle

Expand Down
9 changes: 1 addition & 8 deletions Muzei-bingimageoftheday.iml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="Muzei-bingimageoftheday" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
<option name="BUILDABLE" value="false" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
Expand Down
9 changes: 5 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 31
compileSdkVersion 33

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -16,9 +16,9 @@ android {
defaultConfig {
applicationId "de.devmil.muzei.bingimageofthedayartsource"
minSdkVersion 19
targetSdkVersion 31
versionCode 10
versionName "2.1"
targetSdkVersion 33
versionCode 11
versionName "2.2"

archivesBaseName = "muzei_biot-v${defaultConfig.versionName}-${buildTime()}"

Expand Down Expand Up @@ -64,6 +64,7 @@ android {
lint {
abortOnError false
}
namespace 'de.devmil.muzei.bingimageoftheday'

}

Expand Down
6 changes: 3 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.devmil.muzei.bingimageoftheday">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />

<!-- Required by RemoteMuzeiArtSource -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="29" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

<application
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class BingImageOfTheDayArtProvider : MuzeiArtProvider() {
context.getString(R.string.command_share_title),
PendingIntent.getActivity(context, artwork.id.toInt(),
createShareIntent(context, artwork),
PendingIntent.FLAG_UPDATE_CURRENT))
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE))
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class BingImageOfTheDayWorker(
val alarmManager = context.getSystemService(Context.ALARM_SERVICE) as? AlarmManager

val updateIntent = Intent(context, UpdateReceiver::class.java)
val pendingUpdateIntent = PendingIntent.getBroadcast(context, 1, updateIntent, PendingIntent.FLAG_UPDATE_CURRENT)
val pendingUpdateIntent = PendingIntent.getBroadcast(context, 1, updateIntent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE)

alarmManager?.set(AlarmManager.RTC_WAKEUP, nextUpdate.timeInMillis, pendingUpdateIntent)

Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

buildscript {
ext {
kotlin_version = '1.5.0'
kotlin_version = '1.6.21'
workManagerVersion = "2.7.1"
ktxVersion = "1.7.0"
}
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.3'
classpath 'com.android.tools.build:gradle:8.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -21,7 +21,7 @@ buildscript {

allprojects {
repositories {
jcenter()
mavenCentral()
google()
}
}
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@
# org.gradle.parallel=true

android.useAndroidX=true
android.enableJetifier=true
android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip

0 comments on commit 7fc1bfb

Please sign in to comment.