Rename android module to uhabits-android
148
uhabits-android/build.gradle
Normal file
@@ -0,0 +1,148 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'jacoco'
|
||||
|
||||
android {
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion "25.0.2"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "org.isoron.uhabits"
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 25
|
||||
|
||||
buildConfigField "Integer", "databaseVersion", "19"
|
||||
buildConfigField "String", "databaseFilename", "\"uhabits.db\""
|
||||
buildConfigField "int", "roboSdk", (System.getenv("ROBO_SDK")?: "25")
|
||||
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
testInstrumentationRunnerArgument "size", "medium"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||||
}
|
||||
debug {
|
||||
testCoverageEnabled = true
|
||||
}
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
checkReleaseBuilds false
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
targetCompatibility 1.8
|
||||
sourceCompatibility 1.8
|
||||
}
|
||||
|
||||
testOptions {
|
||||
unitTests.all {
|
||||
testLogging {
|
||||
events "passed", "skipped", "failed", "standardOut", "standardError"
|
||||
outputs.upToDateWhen { false }
|
||||
showStandardStreams = true
|
||||
}
|
||||
jacoco {
|
||||
includeNoLocationClasses = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation 'com.android.support:appcompat-v7:25.3.1'
|
||||
implementation 'com.android.support:design:25.3.1'
|
||||
implementation 'com.android.support:preference-v14:25.3.1'
|
||||
implementation 'com.android.support:support-v4:25.3.1'
|
||||
implementation 'com.getpebble:pebblekit:3.0.0'
|
||||
implementation 'com.github.paolorotolo:appintro:3.4.0'
|
||||
implementation 'com.google.auto.factory:auto-factory:1.0-beta3'
|
||||
implementation 'com.google.dagger:dagger:2.11-rc2'
|
||||
implementation 'com.jakewharton:butterknife:8.6.1-SNAPSHOT'
|
||||
implementation 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
|
||||
implementation 'org.apmem.tools:layouts:1.10'
|
||||
implementation 'org.jetbrains:annotations-java5:15.0'
|
||||
implementation 'com.google.code.gson:gson:2.7'
|
||||
implementation 'com.google.code.findbugs:jsr305:3.0.2'
|
||||
implementation 'com.google.guava:guava:20.0'
|
||||
|
||||
testImplementation 'junit:junit:5.0-SNAPSHOT'
|
||||
testImplementation 'org.hamcrest:hamcrest-library:1.4-atlassian-1'
|
||||
testImplementation 'org.mockito:mockito-core:2.8.9'
|
||||
testImplementation 'org.json:json:20160810'
|
||||
testImplementation 'org.robolectric:robolectric:3.4-rc2'
|
||||
|
||||
androidTestImplementation 'com.android.support:support-annotations:25.3.1'
|
||||
androidTestImplementation 'com.android.support.test:rules:0.5'
|
||||
androidTestImplementation 'com.android.support.test:runner:0.5'
|
||||
androidTestImplementation 'com.google.auto.factory:auto-factory:1.0-beta3'
|
||||
androidTestImplementation "com.google.dexmaker:dexmaker:1.2"
|
||||
androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:1.2'
|
||||
androidTestImplementation 'org.mockito:mockito-core:1.10.19'
|
||||
androidTestImplementation 'com.google.guava:guava:20.0'
|
||||
|
||||
compileOnly 'javax.annotation:jsr250-api:1.0'
|
||||
|
||||
annotationProcessor 'com.google.dagger:dagger-compiler:2.11-rc2'
|
||||
annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.1-SNAPSHOT'
|
||||
annotationProcessor 'com.google.auto.factory:auto-factory:1.0-beta3'
|
||||
|
||||
testAnnotationProcessor 'com.google.dagger:dagger-compiler:2.11-rc2'
|
||||
testAnnotationProcessor 'com.google.auto.factory:auto-factory:1.0-beta3'
|
||||
testAnnotationProcessor 'com.jakewharton:butterknife-compiler:8.6.1-SNAPSHOT'
|
||||
|
||||
androidTestAnnotationProcessor 'com.google.dagger:dagger-compiler:2.11-rc2'
|
||||
androidTestAnnotationProcessor 'com.google.auto.factory:auto-factory:1.0-beta3'
|
||||
androidTestAnnotationProcessor 'com.jakewharton:butterknife-compiler:8.6.1-SNAPSHOT'
|
||||
|
||||
implementation ('com.opencsv:opencsv:3.9') {
|
||||
exclude group: 'commons-logging', module: 'commons-logging'
|
||||
}
|
||||
|
||||
implementation ('io.socket:socket.io-client:+') {
|
||||
exclude group: 'org.json', module: 'json'
|
||||
}
|
||||
}
|
||||
|
||||
jacoco {
|
||||
toolVersion = "0.7.4.201502262128"
|
||||
}
|
||||
|
||||
task coverageReport(type: JacocoReport, dependsOn: ['testDebugUnitTest']) {
|
||||
|
||||
jacocoClasspath = configurations['androidJacocoAnt']
|
||||
|
||||
reports {
|
||||
html.enabled = true
|
||||
xml.enabled = true
|
||||
}
|
||||
|
||||
def excludes = [
|
||||
'**/R.class',
|
||||
'**/R$*.class',
|
||||
'**/BuildConfig.*',
|
||||
'**/Manifest*',
|
||||
'**/*Test*.*',
|
||||
'**/*$Lambda$*',
|
||||
'**/*$ViewBinder*',
|
||||
'**/*MembersInjector*',
|
||||
'**/*_Provide*',
|
||||
'**/*Module_*',
|
||||
'**/com/android/**/*',
|
||||
'android/**/*',
|
||||
'**/*Dagger*',
|
||||
'**/*_Factory*'
|
||||
]
|
||||
|
||||
def srcDir = "${project.projectDir}/src/main/java"
|
||||
def classDir = "${buildDir}/intermediates/classes/debug"
|
||||
def jvmExecData = "${buildDir}/jacoco/testDebugUnitTest.exec"
|
||||
def connectedExecData = "${buildDir}/outputs/code-coverage/connected/coverage.ec"
|
||||
|
||||
sourceDirectories = files(srcDir)
|
||||
classDirectories = files(fileTree(dir: classDir, excludes: excludes))
|
||||
executionData = files(jvmExecData, connectedExecData)
|
||||
}
|
||||
3
uhabits-android/lint.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<lint>
|
||||
</lint>
|
||||
43
uhabits-android/proguard-rules.txt
Normal file
@@ -0,0 +1,43 @@
|
||||
-dontwarn java.**
|
||||
-dontwarn javax.**
|
||||
-dontwarn com.google.auto.**
|
||||
-dontwarn com.google.errorprone.annotations.**
|
||||
-dontwarn com.google.j2objc.annotations.**
|
||||
-dontwarn okio.**
|
||||
-dontwarn okhttp3.**
|
||||
-dontwarn sun.misc.**
|
||||
-dontwarn org.codehaus.mojo.**
|
||||
-dontwarn com.google.gson.internal.*
|
||||
-dontwarn com.google.common.util.concurrent.*
|
||||
-dontwarn com.google.auto.common.*
|
||||
-dontwarn org.apache.commons.beanutils.*
|
||||
-dontwarn org.isoron.uhabits.HabitsApplication
|
||||
|
||||
-dontobfuscate
|
||||
|
||||
-keep class sun.misc.Unsafe { *; }
|
||||
-keep class org.isoron.** { *; }
|
||||
|
||||
-keep public class * extends android.app.Activity
|
||||
-keep public class * extends android.app.Application
|
||||
-keep public class * extends android.app.Service
|
||||
-keep public class * extends android.content.BroadcastReceiver
|
||||
-keep public class * extends android.content.ContentProvider
|
||||
-keep public class * extends android.preference.Preference
|
||||
-keep public class * extends android.view.View {
|
||||
public <init>(android.content.Context);
|
||||
public <init>(android.content.Context, android.util.AttributeSet);
|
||||
public <init>(android.content.Context, android.util.AttributeSet, int);
|
||||
}
|
||||
-keepclasseswithmembers class * {
|
||||
public <init>(android.content.Context, android.util.AttributeSet);
|
||||
}
|
||||
-keepclasseswithmembers class * {
|
||||
public <init>(android.content.Context, android.util.AttributeSet, int);
|
||||
}
|
||||
-keepclassmembers class * extends android.content.Context {
|
||||
public void *(android.view.View);
|
||||
public void *(android.view.MenuItem);
|
||||
}
|
||||
-keep public class * extends android.app.Activity
|
||||
-dontskipnonpubliclibraryclassmembers
|
||||
19
uhabits-android/src/androidTest/assets/habitbull.csv
Normal file
@@ -0,0 +1,19 @@
|
||||
HabitName,HabitDescription,HabitCategory,CalendarDate,Value,CommentText
|
||||
Breed dragons,with love and fire,Diet & Food,2016-03-18,1,
|
||||
Breed dragons,with love and fire,Diet & Food,2016-03-19,1,
|
||||
Breed dragons,with love and fire,Diet & Food,2016-03-21,1,
|
||||
Reduce sleep,only 2 hours per day,Time Management,2016-03-15,1,
|
||||
Reduce sleep,only 2 hours per day,Time Management,2016-03-16,1,
|
||||
Reduce sleep,only 2 hours per day,Time Management,2016-03-17,1,
|
||||
Reduce sleep,only 2 hours per day,Time Management,2016-03-21,1,
|
||||
No-arms pushup,Become like water my friend!,Fitness,2016-03-15,1,
|
||||
No-arms pushup,Become like water my friend!,Fitness,2016-03-16,1,
|
||||
No-arms pushup,Become like water my friend!,Fitness,2016-03-18,1,
|
||||
No-arms pushup,Become like water my friend!,Fitness,2016-03-21,1,
|
||||
No-arms pushup,Become like water my friend!,Fitness,2016-03-15,1,
|
||||
No-arms pushup,Become like water my friend!,Fitness,2016-03-16,1,
|
||||
No-arms pushup,Become like water my friend!,Fitness,2016-03-18,1,
|
||||
No-arms pushup,Become like water my friend!,Fitness,2016-03-21,1,
|
||||
Grow spiritually,"transcend ego, practice compassion, smile and breath",Meditation,2016-03-15,1,
|
||||
Grow spiritually,"transcend ego, practice compassion, smile and breath",Meditation,2016-03-17,1,
|
||||
Grow spiritually,"transcend ego, practice compassion, smile and breath",Meditation,2016-03-21,1,
|
||||
|
BIN
uhabits-android/src/androidTest/assets/icon.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
uhabits-android/src/androidTest/assets/loop.db
Normal file
5
uhabits-android/src/androidTest/assets/pull_failed
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
P=/sdcard/Android/data/org.isoron.uhabits/cache/Failed/
|
||||
|
||||
adb pull $P Failed/
|
||||
adb shell rm -r $P
|
||||
BIN
uhabits-android/src/androidTest/assets/rewire.db
Normal file
BIN
uhabits-android/src/androidTest/assets/tickmate.db
Normal file
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 9.2 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 9.1 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 9.1 KiB |
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 8.3 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 582 B |
|
After Width: | Height: | Size: 541 B |
|
After Width: | Height: | Size: 586 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 9.3 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 577 B |
|
After Width: | Height: | Size: 543 B |
|
After Width: | Height: | Size: 583 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 22 KiB |