diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a8e4df1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +# Gradle files +.gradle/ +build/ + +# Local configuration file (sdk path, etc) +local.properties + +# Android Studio generated folders +.navigation/ +captures/ +.externalNativeBuild + +# IntelliJ project files +*.iml +.idea/ + +# Misc +.DS_Store diff --git a/.travis.yml b/.travis.yml index ad8956d..860d214 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,40 +1,24 @@ language: android -env: - global: - # install timeout in minutes (2 minutes by default) - - ADB_INSTALL_TIMEOUT=24 - - EMULATOR_API_LEVEL=21 - - ANDROID_API_LEVEL=23 - - ANDROID_BUILD_TOOLS_VERSION=23.0.3 - - ANDROID_ABI=armeabi-v7a +jdk: + - oraclejdk8 + +before_cache: + - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock + +cache: + directories: + - $HOME/.gradle/caches/ + - $HOME/.gradle/wrapper/ android: components: - - platform-tools - tools - - build-tools-$ANDROID_BUILD_TOOLS_VERSION - - android-$ANDROID_API_LEVEL - - android-$EMULATOR_API_LEVEL + - platform-tools + - build-tools-25.0.3 + - android-25 - extra-android-m2repository - extra-android-support - - sys-img-armeabi-v7a-android-$ANDROID_API_LEVEL - - sys-img-armeabi-v7a-android-$EMULATOR_API_LEVEL - -jdk: oraclejdk7 - -# Turn off caching to avoid any caching problems -cache: false - -# Use the Travis Container-Based Infrastructure -sudo: false - -# Emulator Management: Create, Start and Wait -before_script: - - echo no | android create avd --force -n test -t android-$EMULATOR_API_LEVEL --abi $ANDROID_ABI - - emulator -avd test -no-skin -no-audio -no-window & - - android-wait-for-emulator - - adb shell input keyevent 82 & -before_install: - - chmod +x gradlew +script: + ./gradlew build diff --git a/CHANGELOG.md b/CHANGELOG.md index 12f5e09..be921ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,11 @@ # DecoView Changelog -v1.0.0 -=== +## [Unreleased] + +- Update to latest support libraries +- Minimum SDK raised to 9 (Android 2.3) + +## 1.0.0 - Support for Android Studio 2.0 - Update targetSdkVersion to 23 @@ -10,19 +14,16 @@ v1.0.0 - Verify split screen behavior on Android N - Promote release to 1.0 -v0.9.6 -=== +## 0.9.6 - Fix issue where line width of arc was incorrect if onPause was called during the Event Show effect -v0.9.5 -=== +## 0.9.5 - Remove `android:allowBackup="true"` from library project to prevent compilation issues for projects that require this attribute to be overridden. This manifest merger issue is discussed in the AOSP issue tracker issue 70073. -v0.9.4 -=== +## 0.9.4 - Added pause() and resume() support for data series move animation - Added pause/resume sample fragment to sample app @@ -30,21 +31,17 @@ v0.9.4 - Changed default move effect animation duration from 2000ms to duration calculated by total series spin duration - Deprecated function DecoView.getSeriesItem(int index). Use DecoView.getChartSeries(index).getSeriesItem() -v0.9.3 -=== +## 0.9.3 - All xml attributes prefixed with 'dv_' -v0.9.2 -=== +## 0.9.2 - Add Travis Continuous Integration - Added support back to Android 2.2 (API 8) - Added new example charts to sample app - Reverse primary and secondary color for drawing gradient - -v0.9.1 -=== +## 0.9.1 Initial implementation diff --git a/README.md b/README.md index 740731d..a29d7ad 100644 --- a/README.md +++ b/README.md @@ -16,25 +16,26 @@ Sample app available from the play store. [![Google Play Store](https://github.com/bmarrdev/android-DecoView-charting/blob/master/art/en_app_rgb_wo_60.png)](https://play.google.com/store/apps/details?id=com.hookedonplay.decoviewsample) -Including DecoView in your project -=== +## Including DecoView in your project Step 1. Add the repositories into your build.gradle - repositories { - // ... - maven { url "https://jitpack.io" } - } +```groovy +repositories { + // ... + maven { url "https://jitpack.io" } +} +``` Step 2. Add the dependency in the form - dependencies { - compile 'com.github.bmarrdev:android-DecoView-charting:v1.2' - } - +```groovy +dependencies { + compile 'com.github.bmarrdev:android-DecoView-charting:v1.2' +} +``` -Usage -=== +## Usage DecoView is subclassed from the Android View class. Just like other View subclasses, such as TextView and ImageView, it can be added and configured from your layout XML then controlled in your Activity code. @@ -45,7 +46,6 @@ The main concepts you need to understand are: - Use [SeriesItem.Builder](https://github.com/bmarrdev/android-DecoView-charting/blob/master/decoviewlib/src/main/java/com/hookedonplay/decoviewlib/charts/SeriesItem.java) to build one or more data series or your DecoView will not be visible - Use [DecoEvent.Builder](https://github.com/bmarrdev/android-DecoView-charting/blob/master/decoviewlib/src/main/java/com/hookedonplay/decoviewlib/events/DecoEvent.java) to schedule animating events for each data series - **Add DecoView to your xml layout** ```xml @@ -74,7 +74,6 @@ SeriesItem seriesItem1 = new SeriesItem.Builder(Color.argb(255, 64, 196, 0)) .build(); int series1Index = arcView.addSeries(seriesItem1); - ``` **Add events to animate the data series** @@ -91,8 +90,7 @@ arcView.addEvent(new DecoEvent.Builder(10).setIndex(series1Index).setDelay(12000 ``` -Chart Shape and orientation -=== +### Chart Shape and orientation The chart can be a full circle (360 degrees) or part of a circle. The number of degrees and the orientation can be set in the DecoView. @@ -108,8 +106,7 @@ By default when using a full circle the data series will originate at the top of When the view is not a complete circle the default initial point is the bottom of the view. Passing 90 will set the initial point to the leftmost point and 180 the topmost. -Chart Gravity -=== +### Chart Gravity By default the chart will maintain a square shape regardless of the dimensions of the DecoView in the layout. @@ -135,8 +132,7 @@ decoView.setHorizGravity(DecoView.HorizGravity.GRAVITY_HORIZONTAL_FILL); decoView.setVertGravity(DecoView.VertGravity.GRAVITY_VERTICAL_BOTTOM); ``` -Constructing a data series -=== +### Constructing a data series One or more data series can be added to the DecoView. These are created using the SeriesItem.Builder(...) class. @@ -166,8 +162,7 @@ SeriesItem seriesItem1 = new SeriesItem.Builder(Color.argb(255, 64, 196, 0)) .build(); ``` -Adding a listener to a data series -=== +### Adding a listener to a data series Once you have a SeriesItem created you can optionally add a SeriesItem.SeriesItemListener() that will allow you to use a callback to monitor the progress of an animation for the data series. @@ -196,8 +191,7 @@ seriesItem.addArcSeriesItemListener(new SeriesItem.SeriesItemListener() { Note that the progress callback includes a percentComplete parameter. This is the percent complete of the current animation being executed, you can calculate the percent filled using the current position. -Animating the data series -=== +### Animating the data series Each data series in the DecoView can be animated in a number of ways. @@ -230,8 +224,7 @@ In the above example some important points to note are: - The index that is passed was returned from the DecoView.addSeries(...) function call - All durations are specified in milliseconds -Adding a listener to an DecoEvent -=== +### Adding a listener to an DecoEvent Adding a listener to a DecoEvent is useful for getting a callback when an event starts and also when an event finishes. @@ -254,8 +247,7 @@ decoView.addEvent(new DecoEvent.Builder(EventType.EVENT_HIDE, false) .build()); ``` -Configuring animation -=== +### Configuring animation Animating the movement when moving the current position of a data series is done using the built-in [Android Interpolator classes](http://developer.android.com/reference/android/view/animation/Interpolator.html). @@ -282,8 +274,7 @@ decoView.addEvent(new DecoEvent.Builder(10) .build()); ``` -Configuring the animation duration -=== +### Configuring the animation duration Much like configuring the Interpolator, the total duration taken to complete an animation can be set when creating the data series, or overridden for each event. @@ -308,8 +299,7 @@ decoView.addEvent(new DecoEvent.Builder(10) .build()); ``` -Adding labels to a data series -=== +### Adding labels to a data series Labels can be added to one or more data series. The labels will only be shown when the data series is visible. @@ -332,8 +322,7 @@ It is possible to use a custom font for the text used on the data labels. Load t Note: Labels are currently not supported on DecoViews which have a data series that move in an anti-clockwise direction. -Insetting arc radius -=== +### Insetting arc radius By default each arc in a series will be located at the center of the widest series of data. The result of this is that two arcs with the same line width will be drawn at the same radius from the center of the view. @@ -352,8 +341,7 @@ SeriesItem seriesItem = new SeriesItem.Builder(Color.parseColor("#FF00FF00") It is also possible to move a data series in an outward direction by using a negative inset. To do this you need to ensure that you don't move the data series outside the viewable area of the View. -Animating color change -=== +### Animating color change Solid color change can be animated from one color to another. This can be done as a stand alone event or during a move event. @@ -381,8 +369,7 @@ decoView.addEvent(new DecoEvent.Builder(EventType.EVENT_COLOR_CHANGE, Color.pars Note: It is not possible to animate color change on series with a color gradient. -Adding an EdgeDetail to a data series -=== +### Adding an EdgeDetail to a data series The EdgeDetail class allows you to apply an effect to the edge of a data series. The image below shows an EdgeDetail applied to each data series. @@ -403,8 +390,7 @@ Note that in the example above the color uses transparency to give the edge of t NOTE: On Android 4.0 to 4.3 Adding an EdgeDetail to a data series will result in Hardware acceleration being turned off for that DecoView. This is due to these platforms not supporting the clipPath() functions with hardware acceleration. It would be unusual for this cause any noticeable difference to the performance of the View. -Adding a shadow to a SeriesItem -=== +### Adding a shadow to a SeriesItem Shadows were introduced in DecoView 1.1, check you gradle dependency before adding shadows. @@ -430,10 +416,7 @@ final SeriesItem seriesItem = new SeriesItem.Builder(Color.parseColor("#FFFF8800 .build(); ``` - - -Fitness tracker Sample -=== +## Fitness tracker Sample In addition to the samples built in this repository a [Fitness tracker sample is available on GitHub](https://github.com/bmarrdev/fauxfit-decoview-sample). @@ -441,20 +424,18 @@ The steps required to build this sample are detailed in the following article: [https://androidbycode.wordpress.com/2015/08/16/creating-a-google-fit-style-circular-animated-view/](https://androidbycode.wordpress.com/2015/08/16/creating-a-google-fit-style-circular-animated-view/) -Requirements -=== +## Requirements + +Android 2.3+ -Android 2.2+ +## Credits -Credits -=== - Continuous integration is provided by [Travis CI](https://travis-ci.org/bmarrdev/android-DecoView-charting). - Jake Wharton for NineOldAndroids allowing support for Android 2.2+ devices. - [Infographic vector designed by Freepik](http://www.freepik.com/free-photos-vectors/infographic) - [Avatars designed by Freepik](http://www.freepik.com/free-vector/family-avatars_796722.htm) -License -=== +## License Copyright 2016 Brent Marriott diff --git a/build.gradle b/build.gradle index e220f0b..5966013 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.1.2' + classpath 'com.android.tools.build:gradle:2.3.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/decoviewlib/.gitignore b/decoviewlib/.gitignore deleted file mode 100644 index 796b96d..0000000 --- a/decoviewlib/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/decoviewlib/build.gradle b/decoviewlib/build.gradle index 1751f8e..696340b 100644 --- a/decoviewlib/build.gradle +++ b/decoviewlib/build.gradle @@ -1,12 +1,11 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 23 - buildToolsVersion "23.0.3" - + compileSdkVersion 25 + buildToolsVersion '25.0.3' defaultConfig { - minSdkVersion 8 - targetSdkVersion 23 + minSdkVersion 9 + targetSdkVersion 25 versionCode 10 versionName "1.2" } @@ -16,15 +15,9 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } - // This enables long timeouts required on slow environments, e.g. Travis - adbOptions { - timeOutInMs 10 * 60 * 1000 // 10 minutes - installOptions "-d","-t" - } } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:23.3.0' + compile 'com.android.support:support-annotations:25.3.1' compile 'com.nineoldandroids:library:2.4.0' } diff --git a/decoviewlib/decoviewlib.iml b/decoviewlib/decoviewlib.iml deleted file mode 100644 index db85c2b..0000000 --- a/decoviewlib/decoviewlib.iml +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/decoviewlib/proguard-rules.pro b/decoviewlib/proguard-rules.pro index 2f919ff..f1b4245 100644 --- a/decoviewlib/proguard-rules.pro +++ b/decoviewlib/proguard-rules.pro @@ -1,17 +1,21 @@ # Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in C:\Users\dell-laptop\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html -# Add any project specific keep options here: - # If your project uses WebView with JS, uncomment the following # and specify the fully qualified class name to the JavaScript interface # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/decoviewlib/src/androidTest/java/com/hookedonplay/decoviewlib/ApplicationTest.java b/decoviewlib/src/androidTest/java/com/hookedonplay/decoviewlib/ApplicationTest.java deleted file mode 100644 index fda95a6..0000000 --- a/decoviewlib/src/androidTest/java/com/hookedonplay/decoviewlib/ApplicationTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.hookedonplay.decoviewlib; - -import android.app.Application; -import android.test.ApplicationTestCase; - -/** - * Testing Fundamentals - */ -public class ApplicationTest extends ApplicationTestCase { - public ApplicationTest() { - super(Application.class); - } -} \ No newline at end of file diff --git a/decoviewlib/src/main/java/com/hookedonplay/decoviewlib/DecoView.java b/decoviewlib/src/main/java/com/hookedonplay/decoviewlib/DecoView.java index 31a4a15..b6c07ea 100644 --- a/decoviewlib/src/main/java/com/hookedonplay/decoviewlib/DecoView.java +++ b/decoviewlib/src/main/java/com/hookedonplay/decoviewlib/DecoView.java @@ -15,6 +15,7 @@ */ package com.hookedonplay.decoviewlib; +import android.annotation.TargetApi; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Canvas; @@ -648,6 +649,7 @@ public void setHorizGravity(HorizGravity horizGravity) { * {@link Canvas#clipPath(Path)} * This is used to clip the drawing rectangle to help render the Edge details decorations */ + @TargetApi(Build.VERSION_CODES.HONEYCOMB) public void enableCompatibilityMode() { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2 && Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..aac7c9b --- /dev/null +++ b/gradle.properties @@ -0,0 +1,17 @@ +# 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 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 8c0fb64..ed88a04 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 22d46c5..c583957 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Sat Apr 09 10:44:18 AEST 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.1-all.zip diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 index 91a7e26..cccdd3d --- a/gradlew +++ b/gradlew @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh ############################################################################## ## @@ -6,20 +6,38 @@ ## ############################################################################## -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +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 @@ -30,6 +48,7 @@ die ( ) { cygwin=false msys=false darwin=false +nonstop=false case "`uname`" in CYGWIN* ) cygwin=true @@ -40,31 +59,11 @@ case "`uname`" in MINGW* ) msys=true ;; + NONSTOP* ) + nonstop=true + ;; esac -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -90,7 +89,7 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then @@ -114,6 +113,7 @@ fi if $cygwin ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` @@ -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 "$@") + +# 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" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index 8a0b282..e95643d 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,90 +1,84 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz 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. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -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 - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/sampleapp/.gitignore b/sampleapp/.gitignore deleted file mode 100644 index 796b96d..0000000 --- a/sampleapp/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/sampleapp/build.gradle b/sampleapp/build.gradle index aae3ae9..4e16b6d 100644 --- a/sampleapp/build.gradle +++ b/sampleapp/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 23 - buildToolsVersion "23.0.3" + compileSdkVersion 25 + buildToolsVersion '25.0.3' defaultConfig { applicationId 'com.hookedonplay.decoviewsample' - minSdkVersion 8 - targetSdkVersion 23 + minSdkVersion 9 + targetSdkVersion 25 versionCode 10 versionName "1.2" } @@ -16,16 +16,10 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } - - // This enables long timeouts required on slow environments, e.g. Travis - adbOptions { - timeOutInMs 10 * 60 * 1000 // 10 minutes - installOptions "-d","-t" - } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:23.3.0' + compile 'com.android.support:appcompat-v7:25.3.1' compile project(':decoviewlib') } diff --git a/sampleapp/proguard-rules.pro b/sampleapp/proguard-rules.pro index 2f919ff..f1b4245 100644 --- a/sampleapp/proguard-rules.pro +++ b/sampleapp/proguard-rules.pro @@ -1,17 +1,21 @@ # Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in C:\Users\dell-laptop\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html -# Add any project specific keep options here: - # If your project uses WebView with JS, uncomment the following # and specify the fully qualified class name to the JavaScript interface # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/sampleapp/sampleapp.iml b/sampleapp/sampleapp.iml deleted file mode 100644 index 44eac82..0000000 --- a/sampleapp/sampleapp.iml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sampleapp/src/androidTest/java/com/hookedonplay/decoviewsample/ApplicationTest.java b/sampleapp/src/androidTest/java/com/hookedonplay/decoviewsample/ApplicationTest.java deleted file mode 100644 index cf1ff7f..0000000 --- a/sampleapp/src/androidTest/java/com/hookedonplay/decoviewsample/ApplicationTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.hookedonplay.decoviewsample; - -import android.app.Application; -import android.test.ApplicationTestCase; - -/** - * Testing Fundamentals - */ -public class ApplicationTest extends ApplicationTestCase { - public ApplicationTest() { - super(Application.class); - } -} \ No newline at end of file