Skip to content
This repository has been archived by the owner on Apr 26, 2020. It is now read-only.

Commit

Permalink
Updated to android studio 3.0 (#306)
Browse files Browse the repository at this point in the history
Updated gradle 4.1 accordingly
  • Loading branch information
DreierF authored Oct 27, 2017
1 parent 505db06 commit 46d5576
Show file tree
Hide file tree
Showing 11 changed files with 115 additions and 110 deletions.
13 changes: 1 addition & 12 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ env:
global:
- ADB_INSTALL_TIMEOUT=8
- ANDROID_API_LEVEL=26
- ANDROID_BUILD_TOOLS_VERSION=26.0.1
- ANDROID_BUILD_TOOLS_VERSION=26.0.2
- EMULATOR_API_LEVEL=19
- ANDROID_ABI=armeabi-v7a
- JAVA7_HOME=/usr/lib/jvm/java-7-oracle
Expand Down
115 changes: 60 additions & 55 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ android {
}

compileSdkVersion compileSdkVersionCode
buildToolsVersion buildToolsVersionCode

playAccountConfigs {
defaultAccountConfig {
Expand Down Expand Up @@ -77,103 +76,109 @@ android {
}
}

flavorDimensions "mode"

productFlavors {
regular {}
screengrab {}
regular {
dimension "mode"
}
screengrab {
dimension "mode"
}
}
}

apply from: '../tools/script-codacy.gradle'
apply from: '../tools/script-play-store.gradle'

dependencies {
compile "com.android.support:support-compat:$libraryVersion.support"
compile "com.android.support:support-core-utils:$libraryVersion.support"
compile "com.android.support:support-core-ui:$libraryVersion.support"
compile "com.android.support:support-fragment:$libraryVersion.support"
compile "com.android.support:support-v13:$libraryVersion.support"
compile "com.android.support:appcompat-v7:$libraryVersion.support"
compile "com.android.support:design:$libraryVersion.support"
compile "com.android.support:support-annotations:$libraryVersion.support"
compile "com.android.support:preference-v7:$libraryVersion.support"
compile "com.android.support:preference-v14:$libraryVersion.support"
compile "com.android.support:recyclerview-v7:$libraryVersion.support"
compile "com.android.support:cardview-v7:$libraryVersion.support"
compile "com.android.support:preference-v14:$libraryVersion.support"
implementation "com.android.support:support-compat:$libraryVersion.support"
implementation "com.android.support:support-core-utils:$libraryVersion.support"
implementation "com.android.support:support-core-ui:$libraryVersion.support"
implementation "com.android.support:support-fragment:$libraryVersion.support"
implementation "com.android.support:support-v13:$libraryVersion.support"
implementation "com.android.support:appcompat-v7:$libraryVersion.support"
implementation "com.android.support:design:$libraryVersion.support"
implementation "com.android.support:support-annotations:$libraryVersion.support"
implementation "com.android.support:preference-v7:$libraryVersion.support"
implementation "com.android.support:preference-v14:$libraryVersion.support"
implementation "com.android.support:recyclerview-v7:$libraryVersion.support"
implementation "com.android.support:cardview-v7:$libraryVersion.support"
implementation "com.android.support:preference-v14:$libraryVersion.support"

compile "com.google.android.gms:play-services-drive:$libraryVersion.playService"
compile "com.google.firebase:firebase-core:$libraryVersion.playService"
compile "com.google.firebase:firebase-crash:$libraryVersion.playService"
implementation "com.google.android.gms:play-services-drive:$libraryVersion.playService"
implementation "com.google.firebase:firebase-core:$libraryVersion.playService"
implementation "com.google.firebase:firebase-crash:$libraryVersion.playService"

compile "com.google.code.gson:gson:$libraryVersion.gson"
implementation "com.google.code.gson:gson:$libraryVersion.gson"

compile "joda-time:joda-time:$libraryVersion.jodaTime"
implementation "joda-time:joda-time:$libraryVersion.jodaTime"

compile "com.squareup.okhttp3:okhttp:$libraryVersion.okhttp"
compile "com.squareup.okhttp3:okhttp-urlconnection:$libraryVersion.okhttp"
implementation "com.squareup.okhttp3:okhttp:$libraryVersion.okhttp"
implementation "com.squareup.okhttp3:okhttp-urlconnection:$libraryVersion.okhttp"

compile "com.squareup.retrofit2:retrofit:$libraryVersion.retrofit"
compile "com.squareup.retrofit2:converter-gson:$libraryVersion.retrofit"
implementation "com.squareup.retrofit2:retrofit:$libraryVersion.retrofit"
implementation "com.squareup.retrofit2:converter-gson:$libraryVersion.retrofit"

compile "com.squareup.picasso:picasso:$libraryVersion.picasso"
implementation "com.squareup.picasso:picasso:$libraryVersion.picasso"

compile "frankiesardo:icepick:$libraryVersion.icepick"
provided "frankiesardo:icepick-processor:$libraryVersion.icepick"
implementation "frankiesardo:icepick:$libraryVersion.icepick"
annotationProcessor "frankiesardo:icepick-processor:$libraryVersion.icepick"

compile "com.github.hotchemi:permissionsdispatcher:$libraryVersion.permissionsdispatcher"
implementation "com.github.hotchemi:permissionsdispatcher:$libraryVersion.permissionsdispatcher"
annotationProcessor "com.github.hotchemi:permissionsdispatcher-processor:$libraryVersion.permissionsdispatcher"

compile "org.parceler:parceler-api:$libraryVersion.parceler"
implementation "org.parceler:parceler-api:$libraryVersion.parceler"
annotationProcessor "org.parceler:parceler:$libraryVersion.parceler"

compile "com.anjlab.android.iab.v3:library:$libraryVersion.iab"
implementation "com.anjlab.android.iab.v3:library:$libraryVersion.iab"

compile "com.github.PhilJay:MPAndroidChart:$libraryVersion.mpAndroidChart"
implementation "com.github.PhilJay:MPAndroidChart:$libraryVersion.mpAndroidChart"

compile "com.github.clans:fab:$libraryVersion.clansFab"
implementation "com.github.clans:fab:$libraryVersion.clansFab"

compile "org.adw.library:discrete-seekbar:$libraryVersion.discreteSeekbar"
implementation "org.adw.library:discrete-seekbar:$libraryVersion.discreteSeekbar"

compile "com.github.jkwiecien:EasyImage:$libraryVersion.easyImage"
implementation "com.github.jkwiecien:EasyImage:$libraryVersion.easyImage"

compile "com.afollestad.material-dialogs:core:$libraryVersion.materialDialogs"
implementation "com.afollestad.material-dialogs:core:$libraryVersion.materialDialogs"

compile "com.github.medyo:android-about-page:$libraryVersion.aboutPage"
implementation "com.github.medyo:android-about-page:$libraryVersion.aboutPage"

compile "com.github.oriley-me.homage:homage-core:$libraryVersion.homage"
compile "com.github.oriley-me.homage:homage-recyclerview:$libraryVersion.homage"
implementation "com.github.oriley-me.homage:homage-core:$libraryVersion.homage"
implementation "com.github.oriley-me.homage:homage-recyclerview:$libraryVersion.homage"

compile "com.makeramen:roundedimageview:$libraryVersion.roundedImageView"
implementation "com.makeramen:roundedimageview:$libraryVersion.roundedImageView"

compile "agency.tango.android:material-intro-screen:$libraryVersion.materialIntroScreen"
implementation "agency.tango.android:material-intro-screen:$libraryVersion.materialIntroScreen"

annotationProcessor "com.github.Raizlabs.DBFlow:dbflow-processor:$libraryVersion.dbFlow"
compile "com.github.Raizlabs.DBFlow:dbflow-core:$libraryVersion.dbFlow"
compile "com.github.Raizlabs.DBFlow:dbflow:$libraryVersion.dbFlow"
implementation "com.github.Raizlabs.DBFlow:dbflow-core:$libraryVersion.dbFlow"
implementation "com.github.Raizlabs.DBFlow:dbflow:$libraryVersion.dbFlow"

compile "com.github.chrisbanes:PhotoView:$libraryVersion.photoView"
implementation "com.github.chrisbanes:PhotoView:$libraryVersion.photoView"

compile project(':shared')
implementation project(':shared')
wearApp project(':wearable')

androidTestCompile "com.google.truth:truth:$libraryVersion.truth"
androidTestCompile "com.google.code.findbugs:jsr305:$libraryVersion.findbugs"
androidTestCompile "com.android.support:support-annotations:$libraryVersion.support"
androidTestCompile "com.android.support.test:runner:$libraryVersion.testSupport"
androidTestCompile "com.android.support.test:rules:$libraryVersion.testSupport"
androidTestCompile "com.android.support.test.uiautomator:uiautomator-v18:$libraryVersion.uiAutomator"
androidTestCompile("com.android.support.test.espresso:espresso-core:$libraryVersion.espresso", {
androidTestImplementation "com.google.truth:truth:$libraryVersion.truth"
androidTestImplementation "com.google.code.findbugs:jsr305:$libraryVersion.findbugs"
androidTestImplementation "com.android.support:support-annotations:$libraryVersion.support"
androidTestImplementation "com.android.support.test:runner:$libraryVersion.testSupport"
androidTestImplementation "com.android.support.test:rules:$libraryVersion.testSupport"
androidTestImplementation "com.android.support.test.uiautomator:uiautomator-v18:$libraryVersion.uiAutomator"
androidTestImplementation("com.android.support.test.espresso:espresso-core:$libraryVersion.espresso", {
exclude group: 'com.android.support'
})
androidTestCompile("com.android.support.test.espresso:espresso-contrib:$libraryVersion.espresso", {
androidTestImplementation("com.android.support.test.espresso:espresso-contrib:$libraryVersion.espresso", {
exclude group: 'com.android.support'
})
androidTestCompile("com.android.support.test.espresso:espresso-intents:$libraryVersion.espresso", {
androidTestImplementation("com.android.support.test.espresso:espresso-intents:$libraryVersion.espresso", {
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude module: 'recyclerview-v7'
})
androidTestScreengrabCompile "tools.fastlane:screengrab:$libraryVersion.screengrab"
androidTestScreengrabImplementation "tools.fastlane:screengrab:$libraryVersion.screengrab"
}

// Must be at the bottom
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,19 @@
package de.dreier.mytargets.features.arrow;


import android.content.Intent;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.RuleChain;
import org.junit.runner.RunWith;

import de.dreier.mytargets.R;
import de.dreier.mytargets.features.main.MainActivity;
import de.dreier.mytargets.features.settings.SettingsManager;
import de.dreier.mytargets.test.base.UITestBase;
import de.dreier.mytargets.test.utils.rules.EmptyDbTestRule;

Expand All @@ -51,14 +54,20 @@
public class EditArrowTest extends UITestBase {

private ActivityTestRule<MainActivity> activityTestRule = new ActivityTestRule<>(
MainActivity.class);
MainActivity.class, true, false);

@Rule
public final RuleChain rule = RuleChain.outerRule(new EmptyDbTestRule())
.around(activityTestRule);

@Before
public void setUp() {
SettingsManager.setFirstTrainingShown(true);
}

@Test
public void editArrowTest() {
activityTestRule.launchActivity(new Intent());
onView(allOf(withText(R.string.arrow), isDisplayed())).perform(click());

// Add new arrow and change some properties
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@
android:label="@string/my_targets"
android:restoreAnyVersion="false"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:replace="android:name">
android:theme="@style/AppTheme">
<meta-data
android:name="android.max_aspect"
android:value="2.1" />
Expand Down
17 changes: 7 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,19 @@
buildscript {
repositories {
jcenter()
google()
maven { url "https://jitpack.io" }
}

dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'me.tatarka:gradle-retrolambda:3.6.1'
classpath 'me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2'
classpath 'com.github.triplet.gradle:play-publisher:1.2.0'
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.2'
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.6.4'
classpath 'com.google.gms:google-services:3.0.0'
classpath 'com.google.firebase:firebase-plugins:1.1.1'
classpath 'com.google.gms:google-services:3.1.1'
classpath 'com.google.firebase:firebase-plugins:1.1.0-alpha1'
}

configurations.classpath.exclude group: 'com.android.tools.external.lombok'
}

plugins {
Expand All @@ -40,7 +38,6 @@ plugins {

ext {
compileSdkVersionCode = 26
buildToolsVersionCode = '26.0.1'

libraryVersion = [
aboutPage : '1.2',
Expand All @@ -50,7 +47,7 @@ ext {
dexmaker : '2.2.0',
discreteSeekbar : '1.0.1',
easyImage : '1.4.2',
espresso : '2.2.2',
espresso : '3.0.1',
findbugs : '3.0.2',
gson : '2.8.0',
homage : '0.2.0',
Expand All @@ -73,7 +70,7 @@ ext {
roundedImageView : '2.2.1',
support : '26.0.2',
supportWearable : '2.0.5',
testSupport : '0.5',
testSupport : '1.0.1',
timber : '4.5.1',
truth : '0.32',
uiAutomator : '2.1.2'
Expand All @@ -83,9 +80,9 @@ ext {
allprojects {
repositories {
jcenter()
google()
maven { url 'https://jitpack.io' }
maven { url 'https://clojars.org/repo/' }
maven { url 'https://maven.google.com' }
}
}

Expand Down
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 @@
#Fri Feb 10 15:28:23 CET 2017
#Sun Sep 10 15:20:25 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
33 changes: 16 additions & 17 deletions shared/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ android {
}

compileSdkVersion compileSdkVersionCode
buildToolsVersion buildToolsVersionCode

defaultConfig {
minSdkVersion 14
Expand All @@ -34,26 +33,26 @@ android {
}

dependencies {
compile "com.android.support:support-v4:$libraryVersion.support"
compile "com.android.support:support-core-ui:$libraryVersion.support"
compile "com.android.support:support-core-utils:$libraryVersion.support"
compile "com.android.support:support-annotations:$libraryVersion.support"
compile "com.annimon:stream:$libraryVersion.annimonStream"
compile "joda-time:joda-time:$libraryVersion.jodaTime"
api "com.android.support:support-v4:$libraryVersion.support"
api "com.android.support:support-core-ui:$libraryVersion.support"
api "com.android.support:support-core-utils:$libraryVersion.support"
api "com.android.support:support-annotations:$libraryVersion.support"
api "com.annimon:stream:$libraryVersion.annimonStream"
api "joda-time:joda-time:$libraryVersion.jodaTime"

compile "org.parceler:parceler-api:$libraryVersion.parceler"
implementation "org.parceler:parceler-api:$libraryVersion.parceler"

annotationProcessor "com.github.Raizlabs.DBFlow:dbflow-processor:$libraryVersion.dbFlow"
compile "com.github.Raizlabs.DBFlow:dbflow-core:$libraryVersion.dbFlow"
compile "com.github.Raizlabs.DBFlow:dbflow:$libraryVersion.dbFlow"
implementation "com.github.Raizlabs.DBFlow:dbflow-core:$libraryVersion.dbFlow"
implementation "com.github.Raizlabs.DBFlow:dbflow:$libraryVersion.dbFlow"

compile "frankiesardo:icepick:$libraryVersion.icepick"
provided "frankiesardo:icepick-processor:$libraryVersion.icepick"
implementation "frankiesardo:icepick:$libraryVersion.icepick"
annotationProcessor "frankiesardo:icepick-processor:$libraryVersion.icepick"

compile "com.google.android.gms:play-services-wearable:$libraryVersion.playService"
compile "com.jakewharton.timber:timber:$libraryVersion.timber"
api "com.google.android.gms:play-services-wearable:$libraryVersion.playService"
api "com.jakewharton.timber:timber:$libraryVersion.timber"

testCompile "junit:junit:$libraryVersion.jUnit"
testCompile "org.mockito:mockito-core:$libraryVersion.mockito"
androidTestCompile "com.android.support.test:runner:$libraryVersion.testSupport"
testImplementation "junit:junit:$libraryVersion.jUnit"
testImplementation "org.mockito:mockito-core:$libraryVersion.mockito"
androidTestImplementation "com.android.support.test:runner:$libraryVersion.testSupport"
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ public class EndRenderer {
private transient int oldRadius;
private transient int oldSelected;
private transient int oldSelectedRadius;
private boolean ambientMode = false;
@SuppressWarnings("WeakerAccess")
boolean ambientMode = false;

public void init(View parent, float density, Target target) {
this.parent = parent;
Expand Down
2 changes: 1 addition & 1 deletion tools/rules-proguard.pro
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@
-keep class * implements com.google.gson.JsonDeserializer

#DBFlow
-keep class * extends com.raizlabs.android.dbflow.config.DatabaseHolder { *; }
-keep class * extends com.raizlabs.android.dbflow.config.DatabaseHolder { *; }
Loading

0 comments on commit 46d5576

Please sign in to comment.