Skip to content

Commit

Permalink
Updated gradle to work with Android Studio 3.0. Updated dependencies.…
Browse files Browse the repository at this point in the history
… Updated Travis.
  • Loading branch information
Pincumbe, Timothy J (Tim) committed Jan 19, 2018
1 parent 6d727ff commit 8322201
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 43 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ android:
- tools
- platform-tools
- tools
- build-tools-26.0.1
- build-tools-27.0.3
- extra-android-m2repository
- extra-google-m2repository
- android-26
- android-27
jdk:
- oraclejdk8
before_install:
Expand Down
18 changes: 17 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
buildscript {
repositories {
jcenter()
google()
}

dependencies {
classpath "com.android.tools.build:gradle:${ANDROID_PLUGIN_VERSION}"
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
}
}

allprojects {
group = GROUP
version = VERSION_NAME
}
repositories {
jcenter()
google()
}
}
11 changes: 4 additions & 7 deletions demo-app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
buildscript {
repositories {
jcenter()
}

dependencies {
classpath "com.android.tools.build:gradle:${ANDROID_PLUGIN_VERSION}"
}
Expand Down Expand Up @@ -37,8 +33,9 @@ android {
}

dependencies {
compile project(':placesautocomplete')
implementation project(':placesautocomplete')

compile 'com.jakewharton:butterknife:6.0.0'
compile 'com.google.code.gson:gson:2.3.1'
implementation 'com.jakewharton:butterknife:8.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
implementation 'com.google.code.gson:gson:2.8.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,32 @@
import com.seatgeek.placesautocomplete.model.Place;
import com.seatgeek.placesautocomplete.model.PlaceDetails;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.InjectView;

public class PlacesAutocompleteActivity extends AppCompatActivity {

@InjectView(R.id.autocomplete)
@BindView(R.id.autocomplete)
PlacesAutocompleteTextView mAutocomplete;

@InjectView(R.id.street)
@BindView(R.id.street)
TextView mStreet;

@InjectView(R.id.city)
@BindView(R.id.city)
TextView mCity;

@InjectView(R.id.state)
@BindView(R.id.state)
TextView mState;

@InjectView(R.id.zip)
@BindView(R.id.zip)
TextView mZip;

@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setContentView(R.layout.activity_places_autocomplete);
ButterKnife.inject(this);
ButterKnife.bind(this);

mAutocomplete.setOnPlaceSelectedListener(new OnPlaceSelectedListener() {
@Override
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=seatgeek
POM_DEVELOPER_NAME=SeatGeek, Inc

ANDROID_PLUGIN_VERSION=2.3.3
BUILD_TOOLS_VERSION=26.0.1
SUPPORT_LIBRARY_VERSION=26.0.0
TARGET_SDK_VERSION=26
ANDROID_PLUGIN_VERSION=3.0.1
BUILD_TOOLS_VERSION=27.0.3
SUPPORT_LIBRARY_VERSION=27.0.2
TARGET_SDK_VERSION=27
MIN_SDK_VERSION=14
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 @@
#Mon Jul 24 16:31:52 EDT 2017
#Fri Jan 19 14:17:47 CST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
26 changes: 6 additions & 20 deletions placesautocomplete/build.gradle
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
buildscript {
repositories {
jcenter()
}

dependencies {
classpath "com.android.tools.build:gradle:${ANDROID_PLUGIN_VERSION}"
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
}
}

apply plugin: 'com.android.library'
apply plugin: 'com.bmuschko.nexus'

repositories {
jcenter()
maven {
url "https://maven.google.com"
}
google()
}

android {
Expand Down Expand Up @@ -44,11 +30,11 @@ android {

dependencies {
compile "com.android.support:appcompat-v7:${SUPPORT_LIBRARY_VERSION}"
compile "com.android.support:design:${SUPPORT_LIBRARY_VERSION}"
provided 'com.google.code.gson:gson:2.3.1'
provided 'com.squareup.okhttp:okhttp:2.2.0'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
implementation "com.android.support:design:${SUPPORT_LIBRARY_VERSION}"
compileOnly 'com.google.code.gson:gson:2.8.0'
compileOnly 'com.squareup.okhttp:okhttp:2.2.0'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.7.6'
}

modifyPom {
Expand Down

0 comments on commit 8322201

Please sign in to comment.