Permalink
Browse files

Android O update

  • Loading branch information...
avalax committed Aug 29, 2017
1 parent 9bcf973 commit ff4c235033104fa82058d228f351a9a952129611
Showing with 76 additions and 62 deletions.
  1. +2 −3 .travis.yml
  2. +37 −29 build.gradle
  3. +6 −3 checkstyle.xml
  4. +4 −7 findbugs.xml
  5. +3 −1 gradle.properties
  6. BIN gradle/wrapper/gradle-wrapper.jar
  7. +1 −2 gradle/wrapper/gradle-wrapper.properties
  8. +17 −9 gradlew
  9. +0 −6 gradlew.bat
  10. +6 −2 pmd.xml
View
@@ -5,9 +5,8 @@ android:
components:
- platform-tools
- tools
- build-tools-25.0.2
- android-25
- extra-android-m2repository
- build-tools-26.0.1
- android-26
before_script:
- ./gradlew dependencies
script:
View
@@ -1,43 +1,48 @@
buildscript {
repositories {
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'com.android.tools.build:gradle:3.0.0-beta2'
}
}
plugins {
id "org.standardout.versioneye" version "1.4.0"
id "com.github.ben-manes.versions" version "0.13.0"
id "com.github.kt3k.coveralls" version "2.7.1"
}
allprojects {
repositories {
jcenter()
google()
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
android {
buildTypeMatching 'debug', 'release'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
packagingOptions {
exclude 'LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
compileSdkVersion 25
buildToolsVersion '25.0.2'
compileSdkVersion 26
buildToolsVersion '26.0.1'
defaultConfig {
applicationId "de.avalax.fitbuddy"
minSdkVersion 19
targetSdkVersion 25
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "de.avalax.fitbuddy.runner.MockTestRunner"
@@ -46,9 +51,12 @@ android {
abortOnError false
}
testOptions {
unitTests.all {
jacoco {
includeNoLocationClasses = true
unitTests {
includeAndroidResources = true
all {
jacoco {
includeNoLocationClasses = true
}
}
}
}
@@ -86,35 +94,35 @@ android {
}
dependencies {
testCompile 'junit:junit:4.12'
testCompile 'org.hamcrest:hamcrest-all:1.3'
testCompile 'org.mockito:mockito-all:1.10.19'
testCompile 'org.assertj:assertj-core:3.6.1'
testCompile 'de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1'
testCompile('org.robolectric:robolectric:3.1.4') {
testImplementation 'junit:junit:4.12'
testImplementation 'org.hamcrest:hamcrest-all:1.3'
testImplementation 'org.mockito:mockito-all:1.10.19'
testImplementation 'org.assertj:assertj-core:3.8.0'
testImplementation 'de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1'
testImplementation('org.robolectric:robolectric:3.1.4') {
exclude module: 'commons-logging'
exclude module: 'httpclient'
}
androidTestCompile 'com.android.support:support-annotations:25.1.0'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.android.support:support-v4:25.1.0'
compile 'com.google.zxing:android-integration:3.3.0'
compile 'com.google.dagger:dagger:2.8'
apt 'com.google.dagger:dagger-compiler:2.8'
androidTestApt 'com.google.dagger:dagger-compiler:2.8'
androidTestImplementation 'com.android.support:support-annotations:26.0.1'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test:rules:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'com.android.support:support-v4:26.0.1'
implementation 'com.google.zxing:android-integration:3.3.0'
implementation 'com.google.dagger:dagger:2.11'
annotationProcessor 'com.google.dagger:dagger-compiler:2.11'
androidTestAnnotationProcessor 'com.google.dagger:dagger-compiler:2.11'
}
versioneye {
exclude 'androidJacocoAgent', 'androidJacocoAnt'
exclude 'androidJacocoAgent', 'androidJacocoAnt', 'jacocoAgent', 'debugRuntimeClasspath'
}
apply plugin: 'jacoco'
jacoco {
toolVersion = "0.7.7.201606060606"
toolVersion = "0.7.9"
}
task jacocoTestReport(type: JacocoReport) {
@@ -171,7 +179,7 @@ afterEvaluate {
}
task wrapper(type: Wrapper) {
gradleVersion = '2.14.1'
gradleVersion = '4.1'
}
apply plugin: 'pmd'
View
@@ -67,10 +67,13 @@
<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<module name="LineLength">
<property name="max" value="100"/>
<property name="max" value="120"/>
</module>
<!--<module name="MethodLength"/>-->
<module name="ParameterNumber"/>
<module name="ParameterNumber">
<property name="max" value="8"/>
<property name="tokens" value="METHOD_DEF"/>
</module>
<!-- Checks for whitespace -->
@@ -125,7 +128,7 @@
<!-- See http://checkstyle.sf.net/config_design.html -->
<!--module name="DesignForExtension"/-->
<!--module name="FinalClass"/-->
<module name="HideUtilityClassConstructor"/>
<!--<module name="HideUtilityClassConstructor"/>-->
<module name="InterfaceIsType"/>
<!--<module name="VisibilityModifier"/>-->
View
@@ -2,14 +2,11 @@
<FindBugsFilter>
<Match>
<Class name="~.*\.R\$.*"/>
</Match>
<Match>
<Class name="~.*\.Manifest\$.*"/>
</Match>
<Match>
<Class name="~.*\.*Test" />
<Not>
<Bug code="IJU" />
</Not>
<Bug pattern="UWF_UNWRITTEN_FIELD" type="UWF_UNWRITTEN_FIELD"/>
</Match>
<Match>
<Bug pattern="NP_UNWRITTEN_FIELD" type="NP_UNWRITTEN_FIELD"/>
</Match>
</FindBugsFilter>
View
@@ -18,4 +18,6 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryErro
# org.gradle.parallel=true
# VersionEye project ID added by Gradle VersionEye plugin
versioneye.projectid=56d966523225f30037816a13
android.builder.sdkDownload=true
android.builder.sdkDownload=true
# Temporary fix for Robolectric
android.enableAapt2=false
Binary file not shown.
@@ -1,6 +1,5 @@
#Sun Jul 24 00:38:09 CEST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
View
26 gradlew
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh
##############################################################################
##
@@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
warn () {
echo "$*"
}
die ( ) {
die () {
echo
echo "$*"
echo
@@ -154,11 +154,19 @@ if $cygwin ; then
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
APP_ARGS=$(save "$@")
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
View
@@ -49,7 +49,6 @@ goto fail
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
@@ -60,11 +59,6 @@ set _SKIP=2
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
View
@@ -1,10 +1,9 @@
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Android Application Rules"
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Java Application Rules"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd">
<rule ref="rulesets/java/android.xml" />
<rule ref="rulesets/java/basic.xml" />
<rule ref="rulesets/java/braces.xml"/>
<rule ref="rulesets/java/clone.xml" />
@@ -15,6 +14,8 @@
</rule>
<rule ref="rulesets/java/design.xml" >
<exclude name="ImmutableField"/>
<exclude name="UseUtilityClass"/>
<exclude name="AbstractClassWithoutAnyMethod"/>
</rule>
<rule ref="rulesets/java/empty.xml" />
<rule ref="rulesets/java/finalizers.xml" />
@@ -39,4 +40,7 @@
<rule ref="rulesets/java/typeresolution.xml" />
<rule ref="rulesets/java/unnecessary.xml" />
<rule ref="rulesets/java/unusedcode.xml" />
<description>
Avalax default ruleset
</description>
</ruleset>

0 comments on commit ff4c235

Please sign in to comment.