Skip to content

Commit

Permalink
Increase minSDK to 19 and remove obsolete androidX Core dependency (#105
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jush authored Nov 24, 2023
1 parent 18846f3 commit ace04ef
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 15 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog for the Mapbox Gestures for Android

## 0.9.0 - November 24, 2023
#### Breaking changes
- Increase minimum supported Android SDK version to 19 (KITKAT)
#### Minor features
- Support compile SDK 30

## 0.8.0 - August 19, 2022
#### Minor features
- Updated dependencies : Maps 10.7.0, targetSdk 31, compileSdk 30. [#101](https://github.com/mapbox/mapbox-gestures-android/pull/101)
Expand Down
11 changes: 11 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ dependencies {
implementation(dependenciesList.mapboxMaps) {
exclude group: 'com.mapbox.mapboxsdk', module: 'mapbox-android-gestures'
}
implementation("androidx.core:core-ktx") {
version {
strictly("1.6.0")
}
}
implementation("androidx.core:core") {
version {
strictly("1.6.0")
}
}


testImplementation dependenciesList.junit
testImplementation dependenciesList.mockito
Expand Down
6 changes: 2 additions & 4 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ext {
androidVersions = [
minSdkVersion : 14,
minSdkVersion : 19,
targetSdkVersion : 30,
compileSdkVersion: 31,
]

version = [
mapboxMaps : '10.7.0',
mapboxMaps : '10.16.2',
timber : '4.7.1',
junit : '4.13.2',
mockito : '3.2.4',
Expand All @@ -15,7 +15,6 @@ ext {
espresso : '3.4.0',
kotlin : '1.5.31',
appCompat : '1.3.0',
core : '1.7.0', // last version compatible with kotlin 1.5.31
annotation : '1.1.0',
]

Expand All @@ -33,7 +32,6 @@ ext {

// support
supportAppcompatV7 : "androidx.appcompat:appcompat:${version.appCompat}",
supportCompat : "androidx.core:core:${version.core}",
annotations : "androidx.annotation:annotation:${version.annotation}",

// timber
Expand Down
1 change: 0 additions & 1 deletion library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation dependenciesList.supportCompat
implementation dependenciesList.annotations
testImplementation dependenciesList.kotlinLib
testImplementation dependenciesList.junit
Expand Down
2 changes: 1 addition & 1 deletion library/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VERSION_NAME=0.9.0-SNAPSHOT
VERSION_NAME=0.10.0-SNAPSHOT
POM_NAME=Mapbox Android Gestures Library
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import androidx.annotation.UiThread;
import androidx.annotation.NonNull;
import androidx.core.view.GestureDetectorCompat;

import android.view.GestureDetector;
import android.view.MotionEvent;

Expand All @@ -19,17 +19,17 @@
import static com.mapbox.android.gestures.AndroidGesturesManager.GESTURE_TYPE_SINGLE_TAP_UP;

/**
* Detector that wraps {@link GestureDetectorCompat}.
* Detector that wraps {@link GestureDetector}.
*/
@UiThread
public class StandardGestureDetector extends BaseGesture<StandardGestureDetector.StandardOnGestureListener> {

private final GestureDetectorCompat gestureDetector;
private final GestureDetector gestureDetector;

public StandardGestureDetector(Context context, AndroidGesturesManager androidGesturesManager) {
super(context, androidGesturesManager);

this.gestureDetector = new GestureDetectorCompat(context, innerListener);
this.gestureDetector = new GestureDetector(context, innerListener);
}

final StandardOnGestureListener innerListener = new StandardOnGestureListener() {
Expand Down Expand Up @@ -149,15 +149,15 @@ protected boolean analyzeEvent(@NonNull MotionEvent motionEvent) {

/**
* @return True if longpress in enabled, false otherwise.
* @see GestureDetectorCompat#isLongpressEnabled()
* @see GestureDetector#isLongpressEnabled()
*/
public boolean isLongpressEnabled() {
return gestureDetector.isLongpressEnabled();
}

/**
* @param enabled True if longpress should be enabled, false otherwise.
* @see GestureDetectorCompat#setIsLongpressEnabled(boolean)
* @see GestureDetector#setIsLongpressEnabled(boolean)
*/
public void setIsLongpressEnabled(boolean enabled) {
gestureDetector.setIsLongpressEnabled(enabled);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import androidx.annotation.DimenRes;
import androidx.annotation.NonNull;
import androidx.annotation.UiThread;
import androidx.core.view.GestureDetectorCompat;
import android.view.GestureDetector;
import android.view.MotionEvent;

Expand All @@ -30,7 +29,7 @@ public class StandardScaleGestureDetector extends

private static final float QUICK_SCALE_MULTIPLIER = 0.5f;

private final GestureDetectorCompat innerGestureDetector;
private final GestureDetector innerGestureDetector;

private boolean quickScale;
private PointF quickScaleFocalPoint;
Expand Down Expand Up @@ -61,7 +60,7 @@ public boolean onDoubleTapEvent(MotionEvent event) {
return true;
}
};
innerGestureDetector = new GestureDetectorCompat(context, doubleTapEventListener);
innerGestureDetector = new GestureDetector(context, doubleTapEventListener);
}

@Override
Expand Down

0 comments on commit ace04ef

Please sign in to comment.