From de4685bc64c1d39d054342b23288f9c808b02c9e Mon Sep 17 00:00:00 2001 From: Niklas Baudy Date: Sat, 24 Jan 2015 00:38:33 +0100 Subject: [PATCH] Cleaned repository, added badges to README.md and fixed build --- .gitignore | 13 +- .travis.yml | 2 +- README.md | 3 + VNTNumberPickerPreference.iml | 21 --- app/app.iml | 89 ----------- app/build.gradle | 7 +- gradle/gradle.iml | 13 -- gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew.bat | 180 +++++++++++------------ import-summary.txt | 64 -------- library/library.iml | 89 ----------- library/vntnumberpickerpreference.iml | 90 ------------ settings.gradle | 2 +- 13 files changed, 112 insertions(+), 463 deletions(-) delete mode 100644 VNTNumberPickerPreference.iml delete mode 100644 app/app.iml delete mode 100644 gradle/gradle.iml delete mode 100644 import-summary.txt delete mode 100644 library/library.iml delete mode 100644 library/vntnumberpickerpreference.iml diff --git a/.gitignore b/.gitignore index 809dd88..aa69d0b 100644 --- a/.gitignore +++ b/.gitignore @@ -25,4 +25,15 @@ proguard/ # Android Studio .idea .gradle -build/ \ No newline at end of file +build/ +*.iml + +# Windows thumbnail db +Thumbs.db + +# OSX files +.DS_Store + +# Eclipse project files +.classpath +.project \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index cd5c0aa..41c426a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,4 +12,4 @@ android: #- echo no | android create avd --force -n test -t android-19 --abi default/armeabi-v7a #- emulator -avd test -no-skin -no-audio -no-window & #- android-wait-for-emulator -script: ./gradlew build \ No newline at end of file +script: ./gradlew clean build \ No newline at end of file diff --git a/README.md b/README.md index 681202f..85ea444 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ VNTNumberPickerPreference ========================= +[![Build Status](https://travis-ci.org/vanniktech/VNTNumberPickerPreference.svg)](https://travis-ci.org/vanniktech/VNTNumberPickerPreference) +[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-VNTNumberPickerPreference-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/799) + This is an easy to use custom preference, which opens a dialog with a number picker. The value gets automatically saved and you can set the default-, min- and maxValue conveniently in the XML. ```xml diff --git a/VNTNumberPickerPreference.iml b/VNTNumberPickerPreference.iml deleted file mode 100644 index 5550340..0000000 --- a/VNTNumberPickerPreference.iml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/app/app.iml b/app/app.iml deleted file mode 100644 index b169397..0000000 --- a/app/app.iml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/build.gradle b/app/build.gradle index d8cf37b..ca2330a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'android' +apply plugin: 'com.android.application' android { compileSdkVersion 19 @@ -13,10 +13,11 @@ android { buildTypes { release { minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } } } dependencies { compile project(':library') -} +} \ No newline at end of file diff --git a/gradle/gradle.iml b/gradle/gradle.iml deleted file mode 100644 index 94f1c61..0000000 --- a/gradle/gradle.iml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1e61d1f..0c71e76 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip diff --git a/gradlew.bat b/gradlew.bat index aec9973..8a0b282 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,90 +1,90 @@ -@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 + +@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 diff --git a/import-summary.txt b/import-summary.txt deleted file mode 100644 index 26295f2..0000000 --- a/import-summary.txt +++ /dev/null @@ -1,64 +0,0 @@ -ECLIPSE ANDROID PROJECT IMPORT SUMMARY -====================================== - -Ignored Files: --------------- -The following files were *not* copied into the new Gradle project; you -should evaluate whether these are still needed in your project and if -so manually move them: - -* .gitignore -* .idea/ -* .idea/.name -* .idea/VNTNumberPickerPreference.iml -* .idea/compiler.xml -* .idea/copyright/ -* .idea/copyright/profiles_settings.xml -* .idea/encodings.xml -* .idea/misc.xml -* .idea/modules.xml -* .idea/scopes/ -* .idea/scopes/scope_settings.xml -* .idea/vcs.xml -* .idea/workspace.xml -* LICENSE -* README.md -* ic_launcher-web.png -* proguard-project.txt - -Replaced Jars with Dependencies: --------------------------------- -The importer recognized the following .jar files as third party -libraries and replaced them with Gradle dependencies instead. This has -the advantage that more explicit version information is known, and the -libraries can be updated automatically. However, it is possible that -the .jar file in your project was of an older version than the -dependency we picked, which could render the project not compileable. -You can disable the jar replacement in the import wizard and try again: - -android-support-v4.jar => com.android.support:support-v4:+ - -Moved Files: ------------- -Android Gradle projects use a different directory structure than ADT -Eclipse projects. Here's how the projects were restructured: - -* AndroidManifest.xml => app/src/main/AndroidManifest.xml -* assets/ => app/src/main/assets/ -* res/ => app/src/main/res/ -* src/ => app/src/main/java/ - -Next Steps: ------------ -You can now build the project. The Gradle project needs network -connectivity to download dependencies. - -Bugs: ------ -If for some reason your project does not build, and you determine that -it is due to a bug or limitation of the Eclipse to Gradle importer, -please file a bug at http://b.android.com with category -Component-Tools. - -(This import summary is for your information only, and can be deleted -after import once you are satisfied with the results.) diff --git a/library/library.iml b/library/library.iml deleted file mode 100644 index 738d1b2..0000000 --- a/library/library.iml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/library/vntnumberpickerpreference.iml b/library/vntnumberpickerpreference.iml deleted file mode 100644 index ebbd97c..0000000 --- a/library/vntnumberpickerpreference.iml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/settings.gradle b/settings.gradle index d8ffba1..ef1bbc7 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,2 @@ include ':app' -include ':library' +include ':library' \ No newline at end of file