Skip to content

Commit

Permalink
fix git ignore build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinPac committed Sep 1, 2020
1 parent 8847303 commit e016daf
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
/captures
.externalNativeBuild
.cxx
/gradle.properties
#/gradle.properties
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation project(path: ':easylocationpicker')
}
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ buildscript {

}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
25 changes: 11 additions & 14 deletions easylocationpicker/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
apply plugin: 'maven-publish'
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'

def artifactId = 'easylocationpicker'
def groupId = 'co.ke.locationpicker'

//jitpack
group = 'com.github.KelvinPac'
version = '1.0'

android {
compileSdkVersion 29
buildToolsVersion "29.0.3"


defaultConfig {
minSdkVersion 21
targetSdkVersion 29
Expand All @@ -19,11 +21,6 @@ android {
consumerProguardFiles 'consumer-rules.pro'
}

/* compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}*/

buildTypes {
release {
minifyEnabled false
Expand All @@ -36,17 +33,17 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.libraries.places:places:2.2.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'com.google.android.libraries.places:places:2.3.0'
implementation 'com.google.android.material:material:1.2.0'
//AirLocation
implementation 'com.github.mumayank:AirLocation:1.2'

testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}

project.afterEvaluate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import android.view.View;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down Expand Up @@ -147,8 +146,7 @@ public void onPlaceSelected(@NonNull Place place) {
@Override
public void onError(@NonNull Status status) {
// TODO: Handle the error.
Log.i(TAG, "An error occurred: " + status);
Toast.makeText(EasyLocationPickerActivity.this, status.getStatusMessage(), Toast.LENGTH_SHORT).show();
Log.e(TAG, "An error occurred: " + status);
}
});

Expand Down Expand Up @@ -259,7 +257,7 @@ public void onCameraIdle() {
getGeoCoderAddress(midLatLng);
} else {
showCoordinatesOnly();
showToast(R.string.easylocation_no_geocoder_available);
showLog(R.string.easylocation_no_geocoder_available);
}
}else {
//show coordinates
Expand Down Expand Up @@ -292,7 +290,6 @@ public void onCameraMoveStarted(int i) {
mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {
@Override
public void onMapClick(LatLng latLng) {
// Toast.makeText(EasyLocationPickerActivity.this, " "+latLng.toString(), Toast.LENGTH_SHORT).show();
//move camera to new user selected position
newLocationSelected(latLng);
}
Expand Down Expand Up @@ -344,14 +341,12 @@ private void displayAddressOutput(String addressOutput) {
address.setVisibility(View.VISIBLE);
}

private void showToast(String string) {
private void showLog(String string) {
Log.d(TAG,string);
// Toast.makeText(this, string, Toast.LENGTH_SHORT).show();
}

private void showToast(int resources) {
private void showLog(int resources) {
Log.d(TAG,getResources().getString(resources));
//Toast.makeText(this, getResources().getString(resources), Toast.LENGTH_SHORT).show();
}

//show data from getting address service
Expand Down Expand Up @@ -386,7 +381,7 @@ protected void onReceiveResult(int resultCode, Bundle resultData) {
//show location position as we fetch address
showCoordinatesOnly();

showToast(addressOutput);
showLog(addressOutput);
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@


<ImageView
android:tint="@color/quantum_vanillared500"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/easylocation_ic_current_place"
android:contentDescription="Current Location Marker" />
android:contentDescription="Current Location Marker"
app:tint="@color/quantum_vanillared500" />


<LinearLayout
Expand Down
20 changes: 20 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true

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 @@
#Sun Apr 05 23:00:31 EAT 2020
#Thu Jul 30 03:27:03 EAT 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

0 comments on commit e016daf

Please sign in to comment.