Merge pull request #1 from iSoron/dev

merge upstream changes
pull/619/head
Christoph Hennemann 6 years ago committed by GitHub
commit 84e9adea24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

29
.gitignore vendored

@ -1,27 +1,16 @@
*.ap_
*.apk
*.class
*.dex
*.iml
*.local
*.local.*
*.pbxuser
*.perspective
*.perspectivev3
*.swp
*.trace
*~
*~.nib
.DS_Store
.classpath
.externalNativeBuild
.gradle
.idea
.project
Thumbs.db
art/
bin/
build
build/
captures/
docs/
gen/
captures
local.properties
crowdin.yaml
local
tmp/
secret/
node_modules
*xcuserdata*

@ -1,5 +1,14 @@
# Changelog
### 1.7.11 (Aug 10, 2019)
* Fix bug that produced corrupted CSV files in some countries
### 1.7.10 (June 15, 2019)
* Fix bug that prevented some devices from showing notifications.
* Update targetSdk to Android Pie (API level 28)
### 1.7.8 (April 21, 2018)
* Add support for adaptive icons (Oreo)

@ -1,16 +1,6 @@
# Loop Habit Tracker
<a href="https://build.loophabits.org/project.html?projectId=LoopHabitTracker&tab=projectOverview&guest=1">
<img src="https://img.shields.io/teamcity/https/build.loophabits.org/s/release.svg">
</a>
<a href="https://build.loophabits.org/project.html?projectId=LoopHabitTracker&tab=preport_project1_Coverage__core_&guest=1">
<img src="https://build.loophabits.org/app/rest/builds/buildType(id:release)/artifacts/content/coverage-badge.svg?guest=1" />
</a>
<a href="https://github.com/iSoron/uhabits/releases/latest">
<img src="https://img.shields.io/badge/apk-stable-FF4081.svg" />
</a>
Loop is a simple Android app that helps you create and maintain good habits,
Loop is a mobile app that helps you create and maintain good habits,
allowing you to achieve your long-term goals. Detailed graphs and statistics
show you how your habits improved over time. It is completely ad-free and open
source.
@ -95,7 +85,7 @@ contribute, even if you are not a software developer.
<img align="right" src="https://www.gnu.org/graphics/gplv3-88x31.png">
Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
Copyright (C) 2016-2019 Álinson Santos Xavier <isoron@gmail.com>
Loop Habit Tracker is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by the

27
android/.gitignore vendored

@ -0,0 +1,27 @@
*.ap_
*.apk
*.class
*.dex
*.iml
*.local
*.local.*
*.swp
*.trace
*~
.DS_Store
.classpath
.gradle
.idea
.project
Thumbs.db
art/
bin/
build/
captures/
docs/
gen/
local.properties
crowdin.yaml
local
tmp/
secret/

@ -2,7 +2,6 @@ apply plugin: 'com.android.library'
android {
compileSdkVersion COMPILE_SDK_VERSION as Integer
buildToolsVersion BUILD_TOOLS_VERSION
defaultConfig {
minSdkVersion MIN_SDK_VERSION as Integer
@ -30,7 +29,6 @@ android {
abortOnError false
}
buildToolsVersion '26.0.2'
}
dependencies {

@ -2,7 +2,6 @@ apply plugin: 'com.android.library'
android {
compileSdkVersion COMPILE_SDK_VERSION as Integer
buildToolsVersion BUILD_TOOLS_VERSION
defaultConfig {
minSdkVersion MIN_SDK_VERSION as Integer
@ -18,7 +17,6 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildToolsVersion '26.0.2'
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8

@ -0,0 +1,21 @@
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:$BUILD_TOOLS_VERSION"
classpath "com.neenbedankt.gradle.plugins:android-apt:1.8"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$KOTLIN_VERSION"
classpath "org.ajoberstar:grgit:1.5.0"
}
}
allprojects {
repositories {
google()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
jcenter()
}
}

@ -121,20 +121,15 @@ uninstall_apk() {
install_test_butler() {
log_info "Installing Test Butler"
$ADB uninstall com.linkedin.android.testbutler
$ADB install tools/test-butler-app-1.3.1.apk
$ADB install tools/test-butler-app-2.0.2.apk
}
install_apk() {
if [ ! -z $UNINSTALL_FIRST ]; then
uninstall_apk
fi
log_info "Installing APK"
if [ ! -z $RELEASE ]; then
$ADB install -r ${OUTPUTS_DIR}/apk/release/uhabits-android-release.apk || fail
else
$ADB install -r ${OUTPUTS_DIR}/apk/debug/uhabits-android-debug.apk || fail
$ADB install -t -r ${OUTPUTS_DIR}/apk/debug/uhabits-android-debug.apk || fail
fi
}
@ -147,9 +142,10 @@ install_test_apk() {
}
run_instrumented_tests() {
SIZE=$1
log_info "Running instrumented tests"
$ADB shell am instrument \
-r -e coverage true -e size medium \
-r -e coverage true -e size $SIZE \
-w ${PACKAGE_NAME}.test/android.support.test.runner.AndroidJUnitRunner \
| tee ${OUTPUTS_DIR}/instrument.txt
@ -180,7 +176,7 @@ fetch_artifacts() {
}
fetch_logcat() {
log_info "Fetching logcat"
log_info "Fetching logcat to ${OUTPUTS_DIR}/logcat.txt"
$ADB logcat -d > ${OUTPUTS_DIR}/logcat.txt
}
@ -215,13 +211,14 @@ accept_images() {
rsync -av tmp/test-screenshots/ uhabits-android/src/androidTest/assets/
}
run_local_tests() {
#clean_output_dir
run_tests() {
SIZE=$1
run_adb_as_root
install_test_butler
uninstall_apk
install_apk
install_test_apk
run_instrumented_tests
run_instrumented_tests $SIZE
parse_instrumentation_results
fetch_artifacts
fetch_logcat
@ -249,7 +246,7 @@ case "$1" in
build_apk
build_instrumentation_apk
run_jvm_tests
generate_coverage_badge
#generate_coverage_badge
;;
ci-tests)
@ -274,16 +271,21 @@ case "$1" in
ADB="${ADB} -s emulator-${AVD_SERIAL}"
start_emulator
run_local_tests
run_tests medium
stop_emulator
stop_gradle_daemon
;;
local-tests)
medium-tests)
shift; parse_opts $*
run_local_tests
run_tests medium
;;
large-tests)
shift; parse_opts $*
run_tests large
;;
fetch-images)
fetch_images
;;
@ -311,7 +313,6 @@ case "$1" in
accept-images Copies fetched images to corresponding assets folder
Options:
-u --uninstall-first Uninstall existing APK first
-r --release Build and install release version, instead of debug
END
exit 1

@ -0,0 +1,16 @@
VERSION_CODE = 39
VERSION_NAME = 1.8.0
MIN_SDK_VERSION = 19
TARGET_SDK_VERSION = 29
COMPILE_SDK_VERSION = 29
DAGGER_VERSION = 2.25.2
KOTLIN_VERSION = 1.3.50
SUPPORT_LIBRARY_VERSION = 28.0.0
AUTO_FACTORY_VERSION = 1.0-beta6
BUILD_TOOLS_VERSION = 3.5.2
org.gradle.parallel=false
org.gradle.daemon=true
org.gradle.jvmargs=-Xms2048m -Xmx2048m -XX:MaxPermSize=2048m

@ -1,6 +1,6 @@
#Sun Sep 24 06:01:27 CDT 2017
#Wed Sep 04 13:05:58 MSK 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

Before

Width:  |  Height:  |  Size: 926 B

After

Width:  |  Height:  |  Size: 926 B

@ -2,8 +2,6 @@ apply plugin: 'idea'
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'jacoco'
apply plugin: 'com.github.triplet.play'
import org.ajoberstar.grgit.Grgit
ext {
@ -14,7 +12,6 @@ ext {
android {
compileSdkVersion COMPILE_SDK_VERSION as Integer
buildToolsVersion BUILD_TOOLS_VERSION
if(project.hasProperty("LOOP_STORE_FILE")) {
signingConfigs {
@ -28,12 +25,6 @@ android {
buildTypes.release.signingConfig signingConfigs.release
}
playAccountConfigs {
defaultAccountConfig {
jsonFile = file('../secret/playstore.json')
}
}
defaultConfig {
versionCode VERSION_CODE as Integer
versionName "$VERSION_NAME ($GIT_BRANCH $GIT_COMMIT)"
@ -42,14 +33,6 @@ android {
applicationId "org.isoron.uhabits"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath false
}
}
playAccountConfig = playAccountConfigs.defaultAccountConfig
}
buildTypes {
@ -80,17 +63,12 @@ android {
outputs.upToDateWhen { false }
showStandardStreams = true
}
jacoco {
includeNoLocationClasses = true
}
}
}
sourceSets {
main.assets.srcDirs += '../uhabits-core/src/main/resources/'
}
buildToolsVersion '26.0.2'
}
dependencies {
@ -108,24 +86,25 @@ dependencies {
implementation "org.apmem.tools:layouts:1.10"
implementation "com.google.code.gson:gson:2.7"
implementation "com.google.code.findbugs:jsr305:3.0.2"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$KOTLIN_VERSION"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$KOTLIN_VERSION"
compileOnly "javax.annotation:jsr250-api:1.0"
compileOnly "com.google.auto.factory:auto-factory:1.0-beta3"
compileOnly "com.google.auto.factory:auto-factory:${AUTO_FACTORY_VERSION}"
kapt "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
kapt "com.jakewharton:butterknife-compiler:8.6.1-SNAPSHOT"
kapt "com.google.auto.factory:auto-factory:1.0-beta3"
kapt "com.jakewharton:butterknife-compiler:9.0.0"
annotationProcessor "com.google.auto.factory:auto-factory:${AUTO_FACTORY_VERSION}"
androidTestImplementation "com.android.support.test.espresso:espresso-contrib:2.2.2"
androidTestImplementation "com.android.support.test.espresso:espresso-core:2.2.2"
androidTestImplementation "com.android.support.test.uiautomator:uiautomator-v18:2.1.1"
androidTestImplementation "com.google.dagger:dagger:$DAGGER_VERSION"
androidTestImplementation "com.linkedin.testbutler:test-butler-library:1.3.1"
androidTestCompileOnly "com.google.auto.factory:auto-factory:1.0-beta3"
androidTestCompileOnly "com.google.auto.factory:auto-factory:${AUTO_FACTORY_VERSION}"
androidTestAnnotationProcessor "com.google.auto.factory:auto-factory:${AUTO_FACTORY_VERSION}"
androidTestImplementation "com.android.support:support-annotations:$SUPPORT_LIBRARY_VERSION"
androidTestImplementation "com.android.support.test:rules:0.5"
androidTestImplementation "com.android.support.test:runner:0.5"
androidTestImplementation "com.google.guava:guava:20.0"
androidTestImplementation "com.google.guava:guava:24.1-android"
androidTestImplementation project(":uhabits-core")
kaptAndroidTest "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
@ -149,44 +128,10 @@ dependencies {
}
repositories {
mavenCentral()
google()
jcenter()
}
kapt {
correctErrorTypes = true
}
task coverageReport(type: JacocoReport) {
def excludes = [
'**/R.class',
'**/R$*.class',
'**/BuildConfig.*',
'**/Manifest*',
'**/*Test*.*',
'**/*$Lambda$*',
'**/*$ViewBinder*',
'**/*MembersInjector*',
'**/*_Provide*',
'**/*Module_*',
'**/com/android/**/*',
'**/*Dagger*',
'**/*_Factory*'
]
def androidSrc = "${project.projectDir}/src/main/java"
def androidClasses = "${buildDir}/intermediates/classes/debug"
def jvmExecData = "${buildDir}/jacoco/testDebugUnitTest.exec"
def connectedExecData = "${buildDir}/outputs/code-coverage/connected/coverage.ec"
sourceDirectories = files(androidSrc)
classDirectories = files(fileTree(dir: androidClasses, excludes: excludes))
executionData = files(jvmExecData, connectedExecData)
jacocoClasspath = configurations['androidJacocoAnt']
reports {
html.enabled = true
xml.enabled = true
}
}
play {
track = 'alpha'
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save