Skip to content

Commit 5d8ec18

Browse files
committed
Update gradle and libraries
1 parent 81414cb commit 5d8ec18

File tree

9 files changed

+49
-187
lines changed

9 files changed

+49
-187
lines changed
Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,22 @@
11
apply plugin: 'com.android.library'
2-
apply plugin: 'maven'
32

43
android {
5-
compileSdkVersion rootProject.ext.compileSdkVersion
4+
namespace 'pl.charmas.android.reactivelocation2'
5+
compileSdk rootProject.ext.compileSdkVersion
66

77
defaultConfig {
8-
minSdkVersion 14
8+
minSdkVersion 21
99
targetSdkVersion rootProject.ext.targetSdkVersion
1010
}
1111

1212
compileOptions {
13-
sourceCompatibility JavaVersion.VERSION_1_7
14-
targetCompatibility JavaVersion.VERSION_1_7
13+
sourceCompatibility JavaVersion.VERSION_17
14+
targetCompatibility JavaVersion.VERSION_17
1515
}
1616
}
1717

18-
//TODO: local maven deployment
19-
2018
dependencies {
21-
api 'com.google.android.gms:play-services-location:21.0.1'
22-
api 'com.google.android.gms:play-services-places:17.0.0'
23-
api 'io.reactivex.rxjava2:rxjava:2.2.0'
19+
api 'com.google.android.gms:play-services-location:21.3.0'
20+
api 'com.google.android.gms:play-services-places:17.1.0'
21+
api 'io.reactivex.rxjava2:rxjava:2.2.21'
2422
}
25-
26-
// Comment this to deploy to local maven repository
27-
apply from: '../maven_push.gradle'
28-
29-
30-
//TODO: clean up
31-
//This is for local maven deployment
32-
33-
//apply plugin: 'maven'
34-
//uploadArchives {
35-
// repositories {
36-
// mavenDeployer {
37-
// repository url: 'file://' + new File(System.getProperty('user.home'), '.m2/repository').absolutePath
38-
// }
39-
// }
40-
//}
41-
//task install(dependsOn: uploadArchives)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest package="pl.charmas.android.reactivelocation2">
2+
<manifest>
33

44
<application></application>
55
</manifest>

android-reactive-location/src/main/java/pl/charmas/android/reactivelocation2/observables/activity/ActivityUpdatesObservableOnSubscribe.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected void onActivityRecognitionClientReady(ActivityRecognitionClient activi
4545
}
4646

4747
private PendingIntent getReceiverPendingIntent() {
48-
return PendingIntent.getBroadcast(context, 0, new Intent(ACTION_ACTIVITY_DETECTED), PendingIntent.FLAG_UPDATE_CURRENT);
48+
return PendingIntent.getBroadcast(context, 0, new Intent(ACTION_ACTIVITY_DETECTED), PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT);
4949
}
5050

5151
@Override

build.gradle

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,23 @@
33
buildscript {
44
repositories {
55
mavenCentral()
6-
jcenter()
76
google()
87
}
98
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.2.1'
9+
classpath 'com.android.tools.build:gradle:8.5.1'
1110
}
1211
}
1312

1413
// To avoid manually setting the same values in all Android modules, set the value on the root
1514
// project and then reference this from the modules
1615
ext {
17-
compileSdkVersion = 28
18-
targetSdkVersion = 28
19-
}
20-
21-
def isReleaseBuild() {
22-
return version.contains("SNAPSHOT") == false
16+
compileSdkVersion = 34
17+
targetSdkVersion = 34
2318
}
2419

2520
allprojects {
26-
version = VERSION_NAME
27-
group = GROUP
28-
2921
repositories {
3022
mavenCentral()
31-
jcenter()
3223
google()
3324
maven { url 'https://jitpack.io' }
3425
}

gradle.properties

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
VERSION_NAME=2.1
22
VERSION_CODE=102
3-
GROUP=pl.charmas.android
4-
5-
6-
POM_DESCRIPTION=Small library that wraps Google Play Service API in brilliant RxJava Observables reducing boilerplate to minimum.
7-
POM_URL=https://github.com/mcharmas/Android-ReactiveLocation
8-
POM_SCM_URL=https://github.com/mcharmas/Android-ReactiveLocation
9-
POM_SCM_CONNECTION=scm:git@github.com:mcharmas/Android-ReactiveLocation.git
10-
POM_SCM_DEV_CONNECTION=scm:git@github.com:mcharmas/Android-ReactiveLocation.git
11-
POM_LICENCE_NAME=The Apache Software License, Version 2.0
12-
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
13-
POM_LICENCE_DIST=repo
14-
POM_DEVELOPER_ID=mcharmas
15-
POM_DEVELOPER_NAME=Michal Charmas
163

174
REACTIVE_LOCATION_GMS_API_KEY=
185

196
android.useAndroidX=true
207
android.enableJetifier=true
8+
android.nonTransitiveRClass=false
9+
android.nonFinalResIds=false
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Thu Oct 25 12:29:40 EEST 2018
1+
#Thu Jul 18 16:33:36 EEST 2024
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

maven_push.gradle

Lines changed: 0 additions & 115 deletions
This file was deleted.

sample/build.gradle

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,39 @@ def getGooglePlayServicesApiKey() {
88
}
99

1010
android {
11-
compileSdkVersion rootProject.ext.compileSdkVersion
11+
namespace 'pl.charmas.android.reactivelocation2.sample'
12+
compileSdk rootProject.ext.compileSdkVersion
1213

1314
defaultConfig {
14-
minSdkVersion 14
15+
minSdkVersion 21
1516
targetSdkVersion rootProject.ext.targetSdkVersion
17+
1618
versionName project.VERSION_NAME
1719
versionCode Integer.parseInt(project.VERSION_CODE)
20+
1821
resValue "string", "API_KEY", getGooglePlayServicesApiKey()
1922
}
2023

2124
compileOptions {
22-
sourceCompatibility JavaVersion.VERSION_1_7
23-
targetCompatibility JavaVersion.VERSION_1_7
25+
sourceCompatibility JavaVersion.VERSION_17
26+
targetCompatibility JavaVersion.VERSION_17
2427
}
28+
2529
buildTypes {
2630
release {
2731
minifyEnabled false
2832
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
2933
}
3034
}
31-
lintOptions {
35+
36+
lint {
3237
abortOnError false
3338
}
3439
}
3540

3641
dependencies {
37-
implementation 'androidx.appcompat:appcompat:1.0.0'
38-
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
42+
implementation 'androidx.appcompat:appcompat:1.7.0'
43+
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
3944
implementation 'com.github.tbruyelle:rxpermissions:0.10.2'
40-
compile project(':android-reactive-location')
45+
implementation project(':android-reactive-location')
4146
}

sample/src/main/AndroidManifest.xml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
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.charmas.android.reactivelocation2.sample">
3+
xmlns:tools="http://schemas.android.com/tools">
54

65
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
7-
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"
6+
<uses-permission
7+
android:name="android.permission.ACCESS_MOCK_LOCATION"
88
tools:ignore="MockLocation" />
99
<uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
1010

@@ -24,6 +24,7 @@
2424

2525
<activity
2626
android:name="pl.charmas.android.reactivelocation2.sample.MainActivity"
27+
android:exported="true"
2728
android:label="@string/app_name">
2829
<intent-filter>
2930
<action android:name="android.intent.action.MAIN" />
@@ -32,15 +33,25 @@
3233
</intent-filter>
3334
</activity>
3435

35-
<activity android:name="pl.charmas.android.reactivelocation2.sample.GeofenceActivity" />
36+
<activity
37+
android:name="pl.charmas.android.reactivelocation2.sample.GeofenceActivity"
38+
android:exported="true" />
3639

37-
<activity android:name="pl.charmas.android.reactivelocation2.sample.PlacesActivity" />
40+
<activity
41+
android:name="pl.charmas.android.reactivelocation2.sample.PlacesActivity"
42+
android:exported="true" />
3843

39-
<activity android:name="pl.charmas.android.reactivelocation2.sample.PlacesResultActivity" />
44+
<activity
45+
android:name="pl.charmas.android.reactivelocation2.sample.PlacesResultActivity"
46+
android:exported="true" />
4047

41-
<activity android:name="pl.charmas.android.reactivelocation2.sample.MockLocationsActivity" />
48+
<activity
49+
android:name="pl.charmas.android.reactivelocation2.sample.MockLocationsActivity"
50+
android:exported="true" />
4251

43-
<receiver android:name="pl.charmas.android.reactivelocation2.sample.GeofenceBroadcastReceiver" />
52+
<receiver
53+
android:name="pl.charmas.android.reactivelocation2.sample.GeofenceBroadcastReceiver"
54+
android:exported="true" />
4455
</application>
4556

4657
</manifest>

0 commit comments

Comments
 (0)