Skip to content

Commit 84a9259

Browse files
authored
Dependency versions bump (#825)
* Dependency versions bump Gradle to 8.1.1 Android Gradle plugin to 8.0.2 Compile & Target SDK to 33 * Release 1.2.26
1 parent 0bd8faf commit 84a9259

25 files changed

+147
-102
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
#### 1.2.26
2+
- 2023-07-30 - [commits](https://github.com/koral--/android-gif-drawable/compare/v1.2.25...v1.2.26)
3+
- Update dependency versions
4+
- Update NDK to 25.2.9519653
5+
- Update Android Gradle plugin to 8.0.2
6+
- Use Java 17 for building
7+
- Switch to upstream ReLinker and update to 1.4.5
8+
- Update compile and target SDK to 33
9+
110
#### 1.2.25
211
- 2022-08-18 - [commits](https://github.com/koral--/android-gif-drawable/compare/v1.2.24...v1.2.25)
312
- Fix sample size not taken into account [(#797)](https://github.com/koral--/android-gif-drawable/pull/797) [(#798)](https://github.com/koral--/android-gif-drawable/pull/798)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Bundled GIFLib via JNI is used to render frames. This way should be more efficie
2222
Insert the following dependency to `build.gradle` file of your project.
2323
```groovy
2424
dependencies {
25-
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.25'
25+
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.26'
2626
}
2727
```
2828
Note that Maven central repository should be defined eg. in top-level `build.gradle` like this:

android-gif-drawable/build.gradle

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ android {
99
compileSdkVersion versions.compileSdk
1010

1111
compileOptions {
12-
sourceCompatibility JavaVersion.VERSION_1_7
13-
targetCompatibility JavaVersion.VERSION_1_7
12+
sourceCompatibility JavaVersion.VERSION_17
13+
targetCompatibility JavaVersion.VERSION_17
1414
}
1515

1616
defaultConfig {
@@ -38,10 +38,12 @@ android {
3838
testOptions {
3939
unitTests.returnDefaultValues = true
4040
}
41+
namespace 'pl.droidsonroids.gif'
42+
testNamespace 'pl.droidsonroids.gif.test'
4143
}
4244

4345
dependencies {
44-
implementation "pl.droidsonroids.relinker:relinker:$versions.relinker"
46+
implementation "com.getkeepsafe.relinker:relinker:$versions.relinker"
4547
compileOnly "androidx.annotation:annotation:$versions.androidxAnnotations"
4648
testCompileOnly "androidx.annotation:annotation:$versions.androidxAnnotations"
4749
testImplementation "junit:junit:$versions.junit"
@@ -51,26 +53,27 @@ dependencies {
5153
testImplementation "net.jodah:concurrentunit:$versions.concurrentunit"
5254
testImplementation "org.khronos:opengl-api:$versions.openglApi"
5355
androidTestImplementation "junit:junit:$versions.junit"
56+
androidTestImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$versions.kotlin"
5457
androidTestImplementation "org.assertj:assertj-core:$versions.assertj1"
5558
androidTestImplementation "androidx.test.ext:junit:$versions.androidXextJunit"
5659
androidTestImplementation "com.squareup.okhttp3:mockwebserver:$versions.mockwebserver"
5760
androidTestImplementation "androidx.test:rules:$versions.androidxTest"
58-
androidTestImplementation "androidx.test:runner:$versions.androidxTest"
61+
androidTestImplementation "androidx.test:runner:$versions.androidxTestRunner"
5962
androidTestCompileOnly "androidx.annotation:annotation:$versions.androidxAnnotations"
6063
}
6164

6265
def isDevelopmentBuild() {
6366
return project.findProperty('android.injected.invoked.from.ide') == 'true'
6467
}
6568

66-
task archiveSymbols(type: Tar) {
69+
tasks.register('archiveSymbols', Tar) {
6770
from new File(buildDir, 'intermediates/cmake/release/obj')
6871
archiveBaseName = "${project.archivesBaseName}-symbols"
6972
destinationDirectory = new File(buildDir, 'libs')
7073
archiveExtension = 'tar.gz'
7174
compression = Compression.GZIP
7275
}
7376

74-
configurations.all {
77+
configurations.configureEach {
7578
resolutionStrategy.force "androidx.annotation:annotation:$versions.androidxAnnotations"
76-
}
79+
}
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="pl.droidsonroids.gif">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

5-
<uses-permission android:name="android.permission.INTERNET"/>
4+
<uses-permission android:name="android.permission.INTERNET" />
65
</manifest>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest package="pl.droidsonroids.gif"/>
2+
<manifest />

android-gif-drawable/src/main/c/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
project(androidGifDrawable)
12
cmake_minimum_required(VERSION 3.4.1)
23

34
set(CMAKE_VERBOSE_MAKEFILE on)

android-gif-drawable/src/main/java/pl/droidsonroids/gif/LibraryLoader.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
import androidx.annotation.NonNull;
77

88
import java.lang.reflect.Method;
9-
10-
import pl.droidsonroids.relinker.ReLinker;
11-
9+
import com.getkeepsafe.relinker.ReLinker;
1210
/**
1311
* Helper used to work around native libraries loading on some systems.
1412
* See <a href="https://medium.com/keepsafe-engineering/the-perils-of-loading-native-libraries-on-android-befa49dce2db">ReLinker</a> for more details.

build.gradle

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
11
buildscript {
22
ext {
33
versions = [
4-
compileSdk : 32,
5-
targetSdk : 32,
4+
compileSdk : 33,
5+
targetSdk : 33,
66
minSdk : 17,
7-
ndk : '25.0.8775105',
8-
androidxAppcompat : '1.5.0',
9-
androidxAnnotations: '1.4.0',
10-
androidxTest : '1.4.0',
11-
coroutines : '1.6.4',
12-
leakCanary : '2.9.1',
13-
kotlin : '1.7.10',
7+
ndk : '25.2.9519653',
8+
androidxAppcompat : '1.6.1',
9+
lifecycle : '2.6.1',
10+
androidxAnnotations: '1.6.0',
11+
androidxTest : '1.5.0',
12+
androidxTestRunner : '1.5.2',
13+
coroutines : '1.7.1',
14+
leakCanary : '2.11',
15+
kotlin : '1.8.22',
1416
intellijAnnotations: '13.0',
15-
material : '1.6.1',
16-
androidXextJunit : '1.1.3',
17-
androidGradlePlugin: '7.2.0',
17+
material : '1.9.0',
18+
androidXextJunit : '1.1.5',
19+
androidGradlePlugin: '8.0.2',
1820
junit : '4.13.2',
19-
mockito : '4.6.1',
20-
robolectric : '4.4',
21+
mockito : '5.4.0',
22+
robolectric : '4.8.1',
2123
assertj3 : '3.14.0',
2224
assertj1 : '1.7.1',
2325
concurrentunit : '0.4.6',
2426
openglApi : 'gl1.1-android-2.1_r1',
2527
mockwebserver : '4.9.0',
26-
relinker : '1.4.1',
28+
relinker : '1.4.5',
2729
mavenPublishPlugin : '0.21.0',
2830
]
2931
}
@@ -41,7 +43,7 @@ buildscript {
4143

4244

4345
subprojects {
44-
tasks.withType(JavaCompile) {
46+
tasks.withType(JavaCompile).configureEach {
4547
options.compilerArgs << '-Xlint'
4648
}
4749
repositories {

gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
org.gradle.jvmargs=-Xmx1536M
22
android.useAndroidX=true
3+
android.nonFinalResIds=false
34

45
SONATYPE_HOST=DEFAULT
56
RELEASE_SIGNING_ENABLED=true
67

78
GROUP=pl.droidsonroids.gif
89
POM_ARTIFACT_ID=android-gif-drawable
9-
VERSION_NAME=1.2.25
10+
VERSION_NAME=1.2.26
1011

1112
POM_NAME=android-gif-drawable
1213
POM_DESCRIPTION=Views and Drawable for displaying animated GIFs for Android
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

sample/build.gradle

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
3-
apply plugin: 'kotlin-android-extensions'
43

54
android {
65
ndkVersion versions.ndk
@@ -33,7 +32,18 @@ android {
3332
jniDebuggable true
3433
}
3534
}
36-
lintOptions {
35+
36+
compileOptions {
37+
sourceCompatibility JavaVersion.VERSION_17
38+
targetCompatibility JavaVersion.VERSION_17
39+
}
40+
packagingOptions {
41+
jniLibs {
42+
useLegacyPackaging true
43+
}
44+
}
45+
namespace 'pl.droidsonroids.gif.sample'
46+
lint {
3747
disable 'AppCompatCustomView'
3848
}
3949
}
@@ -43,6 +53,7 @@ dependencies {
4353
debugImplementation "com.squareup.leakcanary:leakcanary-android:$versions.leakCanary"
4454
implementation "com.google.android.material:material:$versions.material"
4555
implementation "androidx.appcompat:appcompat:$versions.androidxAppcompat"
56+
implementation "androidx.lifecycle:lifecycle-common:$versions.lifecycle"
4657
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$versions.kotlin"
4758
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$versions.coroutines"
4859
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$versions.coroutines"

sample/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
android.useAndroidX = true
2-
android.enableJetifier = true
2+
android.enableJetifier = false

sample/src/main/AndroidManifest.xml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:tools="http://schemas.android.com/tools"
4-
package="pl.droidsonroids.gif.sample">
3+
xmlns:tools="http://schemas.android.com/tools">
54

6-
<uses-permission android:name="android.permission.INTERNET"/>
5+
<uses-permission android:name="android.permission.INTERNET" />
76

87
<uses-feature
98
android:glEsVersion="0x00020000"
10-
android:required="false"/>
9+
android:required="false" />
1110

1211
<uses-feature
1312
android:name="android.software.live_wallpaper"
14-
android:required="false"/>
13+
android:required="false" />
1514

1615
<application
1716
android:allowBackup="false"
18-
android:extractNativeLibs="true"
1917
android:hardwareAccelerated="true"
2018
android:icon="@drawable/ic_launcher"
2119
android:label="@string/app_name"
@@ -25,25 +23,24 @@
2523
android:name="pl.droidsonroids.gif.sample.MainActivity"
2624
android:exported="true">
2725
<intent-filter>
28-
<action android:name="android.intent.action.MAIN"/>
26+
<action android:name="android.intent.action.MAIN" />
2927

30-
<category android:name="android.intent.category.LAUNCHER"/>
28+
<category android:name="android.intent.category.LAUNCHER" />
3129
</intent-filter>
3230
</activity>
3331
<service
3432
android:name=".wallpaper.GifWallpaperService"
33+
android:exported="true"
3534
android:icon="@drawable/led7"
3635
android:label="@string/wallpaper_label"
37-
android:permission="android.permission.BIND_WALLPAPER"
38-
android:exported="true">
36+
android:permission="android.permission.BIND_WALLPAPER">
3937
<intent-filter>
40-
<action android:name="android.service.wallpaper.WallpaperService"/>
38+
<action android:name="android.service.wallpaper.WallpaperService" />
4139
</intent-filter>
4240

4341
<meta-data
4442
android:name="android.service.wallpaper"
45-
android:resource="@xml/wallpaper">
46-
</meta-data>
43+
android:resource="@xml/wallpaper"></meta-data>
4744
</service>
4845
</application>
4946

sample/src/main/java/pl/droidsonroids/gif/sample/AnimatedSelectorFragment.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,17 @@ import android.view.LayoutInflater
99
import android.view.View
1010
import android.view.ViewGroup
1111
import androidx.fragment.app.Fragment
12-
import kotlinx.android.synthetic.main.animated_selector.view.*
1312
import pl.droidsonroids.gif.GifDrawable
1413

1514
class AnimatedSelectorFragment : Fragment() {
1615

1716
@Suppress("DEPRECATION")
1817
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
1918
val rootView = inflater.inflate(R.layout.animated_selector, container, false)
20-
rootView.buttonKotlin.setBackgroundDrawable(kotlinAnimatedBackground)
19+
rootView.findViewById<View>(R.id.buttonKotlin).setBackgroundDrawable(kotlinAnimatedBackground)
2120

2221
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
23-
rootView.buttonXML.setBackgroundDrawable(xmlAnimatedBackground)
22+
rootView.findViewById<View>(R.id.buttonXML).setBackgroundDrawable(xmlAnimatedBackground)
2423
}
2524

2625
return rootView

sample/src/main/java/pl/droidsonroids/gif/sample/AnimationControlFragment.kt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ import android.os.Bundle
44
import android.view.LayoutInflater
55
import android.view.View
66
import android.view.ViewGroup
7+
import android.widget.ToggleButton
78
import androidx.fragment.app.Fragment
89
import com.google.android.material.snackbar.Snackbar
9-
import kotlinx.android.synthetic.main.animation_control.*
1010
import pl.droidsonroids.gif.AnimationListener
1111
import pl.droidsonroids.gif.GifDrawable
12+
import pl.droidsonroids.gif.GifImageView
1213

1314
class AnimationControlFragment : Fragment(), AnimationListener {
1415

@@ -18,7 +19,7 @@ class AnimationControlFragment : Fragment(), AnimationListener {
1819
return inflater.inflate(R.layout.animation_control, container, false)
1920
}
2021

21-
private fun resetAnimation() {
22+
private fun resetAnimation(buttonToggle: ToggleButton) {
2223
gifDrawable.stop()
2324
gifDrawable.loopCount = 4
2425
gifDrawable.seekToFrameAndGet(5)
@@ -32,11 +33,12 @@ class AnimationControlFragment : Fragment(), AnimationListener {
3233

3334
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
3435
super.onViewCreated(view, savedInstanceState)
35-
buttonReset.setOnClickListener { resetAnimation() }
36+
val buttonToggle = view.findViewById<ToggleButton>(R.id.buttonToggle)
37+
view.findViewById<View>(R.id.buttonReset).setOnClickListener { resetAnimation(buttonToggle) }
3638
buttonToggle.setOnClickListener { toggleAnimation() }
37-
gifDrawable = gifImageView.drawable as GifDrawable
39+
gifDrawable = view.findViewById<GifImageView>(R.id.gifImageView).drawable as GifDrawable
3840

39-
resetAnimation()
41+
resetAnimation(view.findViewById(R.id.buttonToggle))
4042
gifDrawable.addAnimationListener(this)
4143
}
4244

0 commit comments

Comments
 (0)