Skip to content

Commit

Permalink
Update gradle and libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
modislaszlox2 committed Jul 18, 2024
1 parent 81414cb commit 3f0141a
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 187 deletions.
54 changes: 28 additions & 26 deletions android-reactive-location/build.gradle
Original file line number Diff line number Diff line change
@@ -1,41 +1,43 @@
apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'maven-publish'

android {
compileSdkVersion rootProject.ext.compileSdkVersion
namespace 'pl.charmas.android.reactivelocation2'
compileSdk rootProject.ext.compileSdkVersion

defaultConfig {
minSdkVersion 14
minSdkVersion 21
targetSdkVersion rootProject.ext.targetSdkVersion
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}

//TODO: local maven deployment
publishing {
singleVariant("release") {
withSourcesJar()
withJavadocJar()
}
}
}

dependencies {
api 'com.google.android.gms:play-services-location:21.0.1'
api 'com.google.android.gms:play-services-places:17.0.0'
api 'io.reactivex.rxjava2:rxjava:2.2.0'
api 'com.google.android.gms:play-services-location:21.3.0'
api 'com.google.android.gms:play-services-places:17.1.0'
api 'io.reactivex.rxjava2:rxjava:2.2.21'
}

// Comment this to deploy to local maven repository
apply from: '../maven_push.gradle'


//TODO: clean up
//This is for local maven deployment

//apply plugin: 'maven'
//uploadArchives {
// repositories {
// mavenDeployer {
// repository url: 'file://' + new File(System.getProperty('user.home'), '.m2/repository').absolutePath
// }
// }
//}
//task install(dependsOn: uploadArchives)
afterEvaluate {
publishing {
publications {
register("gpr", MavenPublication) {
from(components["release"])
groupId = GROUP
artifactId = 'android-reactive-location2'
version = VERSION_NAME
}
}
}
}
2 changes: 1 addition & 1 deletion android-reactive-location/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="pl.charmas.android.reactivelocation2">
<manifest>

<application></application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected void onActivityRecognitionClientReady(ActivityRecognitionClient activi
}

private PendingIntent getReceiverPendingIntent() {
return PendingIntent.getBroadcast(context, 0, new Intent(ACTION_ACTIVITY_DETECTED), PendingIntent.FLAG_UPDATE_CURRENT);
return PendingIntent.getBroadcast(context, 0, new Intent(ACTION_ACTIVITY_DETECTED), PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT);
}

@Override
Expand Down
16 changes: 4 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,24 @@
buildscript {
repositories {
mavenCentral()
jcenter()
google()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.android.tools.build:gradle:8.5.1'
}
}

// To avoid manually setting the same values in all Android modules, set the value on the root
// project and then reference this from the modules
ext {
compileSdkVersion = 28
targetSdkVersion = 28
}

def isReleaseBuild() {
return version.contains("SNAPSHOT") == false
compileSdkVersion = 34
targetSdkVersion = 34
}

allprojects {
version = VERSION_NAME
group = GROUP

repositories {
mavenCentral()
jcenter()
google()
maven { url 'https://jitpack.io' }
}
Expand Down
18 changes: 4 additions & 14 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
VERSION_NAME=2.1
VERSION_CODE=102
VERSION_NAME=3.0
VERSION_CODE=103
GROUP=pl.charmas.android


POM_DESCRIPTION=Small library that wraps Google Play Service API in brilliant RxJava Observables reducing boilerplate to minimum.
POM_URL=https://github.com/mcharmas/Android-ReactiveLocation
POM_SCM_URL=https://github.com/mcharmas/Android-ReactiveLocation
POM_SCM_CONNECTION=scm:[email protected]:mcharmas/Android-ReactiveLocation.git
POM_SCM_DEV_CONNECTION=scm:[email protected]:mcharmas/Android-ReactiveLocation.git
POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=mcharmas
POM_DEVELOPER_NAME=Michal Charmas

REACTIVE_LOCATION_GMS_API_KEY=

android.useAndroidX=true
android.enableJetifier=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Oct 25 12:29:40 EEST 2018
#Thu Jul 18 16:33:36 EEST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
115 changes: 0 additions & 115 deletions maven_push.gradle

This file was deleted.

21 changes: 13 additions & 8 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,39 @@ def getGooglePlayServicesApiKey() {
}

android {
compileSdkVersion rootProject.ext.compileSdkVersion
namespace 'pl.charmas.android.reactivelocation2.sample'
compileSdk rootProject.ext.compileSdkVersion

defaultConfig {
minSdkVersion 14
minSdkVersion 21
targetSdkVersion rootProject.ext.targetSdkVersion

versionName project.VERSION_NAME
versionCode Integer.parseInt(project.VERSION_CODE)

resValue "string", "API_KEY", getGooglePlayServicesApiKey()
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
lintOptions {

lint {
abortOnError false
}
}

dependencies {
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'com.github.tbruyelle:rxpermissions:0.10.2'
compile project(':android-reactive-location')
implementation project(':android-reactive-location')
}
27 changes: 19 additions & 8 deletions sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="pl.charmas.android.reactivelocation2.sample">
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"
<uses-permission
android:name="android.permission.ACCESS_MOCK_LOCATION"
tools:ignore="MockLocation" />
<uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />

Expand All @@ -24,6 +24,7 @@

<activity
android:name="pl.charmas.android.reactivelocation2.sample.MainActivity"
android:exported="true"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -32,15 +33,25 @@
</intent-filter>
</activity>

<activity android:name="pl.charmas.android.reactivelocation2.sample.GeofenceActivity" />
<activity
android:name="pl.charmas.android.reactivelocation2.sample.GeofenceActivity"
android:exported="true" />

<activity android:name="pl.charmas.android.reactivelocation2.sample.PlacesActivity" />
<activity
android:name="pl.charmas.android.reactivelocation2.sample.PlacesActivity"
android:exported="true" />

<activity android:name="pl.charmas.android.reactivelocation2.sample.PlacesResultActivity" />
<activity
android:name="pl.charmas.android.reactivelocation2.sample.PlacesResultActivity"
android:exported="true" />

<activity android:name="pl.charmas.android.reactivelocation2.sample.MockLocationsActivity" />
<activity
android:name="pl.charmas.android.reactivelocation2.sample.MockLocationsActivity"
android:exported="true" />

<receiver android:name="pl.charmas.android.reactivelocation2.sample.GeofenceBroadcastReceiver" />
<receiver
android:name="pl.charmas.android.reactivelocation2.sample.GeofenceBroadcastReceiver"
android:exported="true" />
</application>

</manifest>

0 comments on commit 3f0141a

Please sign in to comment.