Merge pull request #1 from HabitRPG/develop

online sync
This commit is contained in:
LunarGem 2017-09-21 19:49:42 -04:00 committed by GitHub
commit 23f6b8f577
405 changed files with 12849 additions and 2628 deletions

View file

@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="com.habitrpg.android.habitica" package="com.habitrpg.android.habitica"
android:versionCode="1921" android:versionCode="1931"
android:versionName="1.1.5" android:versionName="1.2"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:installLocation="auto" > android:installLocation="auto" >
@ -19,7 +19,6 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="com.android.vending.BILLING" /> <uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application <application
android:name=".HabiticaApplication" android:name=".HabiticaApplication"
@ -27,7 +26,8 @@
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
tools:replace="android:name"> tools:replace="android:name"
android:fullBackupContent="@xml/backup_descriptor">
<activity <activity
android:name=".ui.activities.MainActivity" android:name=".ui.activities.MainActivity"
android:label="@string/app_name" android:label="@string/app_name"
@ -168,7 +168,8 @@
android:process=":remote" android:process=":remote"
android:name=".receivers.TaskReceiver"/> android:name=".receivers.TaskReceiver"/>
<receiver android:name=".receivers.LocalNotificationActionReceiver"> <receiver android:name=".receivers.LocalNotificationActionReceiver"
android:exported="false">
<intent-filter> <intent-filter>
<action android:name="ACCEPT_PARTY_INVITE"/> <action android:name="ACCEPT_PARTY_INVITE"/>
<action android:name="REJECT_PARTY_INVITE"/> <action android:name="REJECT_PARTY_INVITE"/>
@ -193,13 +194,15 @@
</intent-filter> </intent-filter>
</activity> </activity>
<service <service
android:name=".helpers.notifications.HabiticaFirebaseMessagingService"> android:name=".helpers.notifications.HabiticaFirebaseMessagingService"
android:exported="false">
<intent-filter> <intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/> <action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter> </intent-filter>
</service> </service>
<service <service
android:name=".helpers.notifications.HabiticaFirebaseInstanceIDService"> android:name=".helpers.notifications.HabiticaFirebaseInstanceIDService"
android:exported="false">
<intent-filter> <intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/> <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
</intent-filter> </intent-filter>

View file

@ -1 +0,0 @@
ALTER TABLE HabitRPGUser ADD COLUMN flags_id varchar(255);

View file

@ -1 +0,0 @@
ALTER TABLE Quest ADD COLUMN RSVPNeeded bool;

View file

@ -1,3 +0,0 @@
DELETE FROM QuestContent;
ALTER TABLE QuestProgress ADD COLUMN hp float;
ALTER TABLE QuestProgress ADD COLUMN rage float;

View file

@ -1 +0,0 @@
ALTER TABLE ItemData ADD COLUMN owned bool;

View file

@ -1 +0,0 @@
ALTER TABLE QuestContent ADD COLUMN 'owned' INTEGER DEFAULT 0;

View file

@ -1 +0,0 @@
ALTER TABLE QuestContent ADD COLUMN 'boss_id' bool;

View file

@ -1 +0,0 @@
ALTER TABLE UserParty ADD COLUMN 'partyOrder' varchar(255);

View file

@ -1 +0,0 @@
ALTER TABLE HabitRPGUser ADD COLUMN authentication_id varchar(255);

View file

@ -1 +0,0 @@
ALTER TABLE Preferences ADD COLUMN 'chair' varchar(255);

View file

@ -1,2 +0,0 @@
ALTER TABLE HabitRPGUser ADD COLUMN 'contributor_id' INTEGER;
ALTER TABLE HabitRPGUser ADD COLUMN 'inbox_id' INTEGER;

View file

@ -1 +0,0 @@
ALTER TABLE HabitRPGUser ADD COLUMN 'invitations_id' INTEGER;

View file

@ -1 +0,0 @@
ALTER TABLE Preferences ADD COLUMN 'language' varchar(15);

View file

@ -1,3 +0,0 @@
ALTER TABLE Buffs ADD COLUMN seafoam bool;
ALTER TABLE Buffs ADD COLUMN spookySparkles bool;
ALTER TABLE Buffs ADD COLUMN shinySeed bool;

View file

@ -1 +0,0 @@
ALTER TABLE Items ADD COLUMN 'special_id' INTEGER;

View file

@ -1 +0,0 @@
ALTER TABLE Preferences ADD COLUMN 'sound' varchar(50);

View file

@ -1 +0,0 @@
ALTER TABLE HabitRPGUser ADD COLUMN purchased_id varchar(255);

View file

@ -1 +0,0 @@
ALTER TABLE Task ADD COLUMN group_id varchar(255);

View file

@ -1 +0,0 @@
ALTER TABLE ItemData ADD COLUMN specialClass varchar(255);

View file

@ -1,2 +0,0 @@
ALTER TABLE Preferences ADD COLUMN dailyDueDefaultView bool;

View file

@ -1 +0,0 @@
ALTER TABLE Customization ADD COLUMN isBuyable bool;

View file

@ -1 +0,0 @@
ALTER TABLE Task ADD COLUMN isDue BOOLEAN;

View file

@ -1 +0,0 @@
ALTER TABLE Task ADD COLUMN nextDue DATE;

View file

@ -1,2 +0,0 @@
ALTER TABLE Task ADD COLUMN daysOfMonthString varchar(255);
ALTER TABLE Task ADD COLUMN weeksOfMonthString varchar(255);

View file

@ -1 +0,0 @@
ALTER TABLE Task ADD COLUMN 'position' INTEGER DEFAULT 0;

View file

@ -1 +0,0 @@
ALTER TABLE Hair ADD COLUMN 'flower' INTEGER DEFAULT 0;

View file

@ -1 +0,0 @@
ALTER TABLE ChecklistItem ADD COLUMN 'position' INTEGER DEFAULT 0;

View file

@ -1 +0,0 @@
ALTER TABLE Task ADD COLUMN 'duedate' DATE;

View file

@ -1,290 +1,302 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply plugin: 'com.android.databinding' apply plugin: 'com.android.databinding'
apply plugin: 'io.fabric' apply plugin: 'io.fabric'
apply plugin: 'com.neenbedankt.android-apt' apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'com.noveogroup.android.check' apply plugin: 'com.noveogroup.android.check'
apply plugin: 'realm-android' apply plugin: 'realm-android'
buildscript { buildscript {
repositories { repositories {
mavenLocal() mavenLocal()
mavenCentral() mavenCentral()
maven { url 'https://maven.fabric.io/public' } maven { url 'https://maven.fabric.io/public' }
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'io.fabric.tools:gradle:1.21.6' classpath 'io.fabric.tools:gradle:1.21.6'
classpath 'me.tatarka:gradle-retrolambda:3.3.1' classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' classpath('com.noveogroup.android:check:1.2.3') {
classpath('com.noveogroup.android:check:1.2.3') { exclude module: 'checkstyle'
exclude module: 'checkstyle' exclude module: 'pmd-java'
exclude module: 'pmd-java' }
} classpath 'com.puppycrawl.tools:checkstyle:7.5'
classpath 'com.puppycrawl.tools:checkstyle:7.5' classpath 'net.sourceforge.pmd:pmd-java:5.5.3'
classpath 'net.sourceforge.pmd:pmd-java:5.5.3' }
} }
}
repositories {
repositories { mavenLocal()
mavenLocal() mavenCentral()
mavenCentral() maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" } maven { url 'https://maven.fabric.io/public' }
maven { url 'https://maven.fabric.io/public' }
// Material View Pager
// Material View Pager maven { url "http://dl.bintray.com/florent37/maven" }
maven { url "http://dl.bintray.com/florent37/maven" }
// Markdown
// Markdown maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
maven { url "https://jitpack.io" }
maven { url "https://jitpack.io" } }
}
dependencies {
dependencies { compile fileTree(include: ['*.jar'], dir: 'libs')
compile fileTree(include: ['*.jar'], dir: 'libs') //Networking
//Networking compile 'com.squareup.okhttp3:okhttp:3.8.1'
compile 'com.squareup.okhttp3:okhttp:3.8.1' compile 'com.squareup.okhttp3:logging-interceptor:3.8.1'
compile 'com.squareup.okhttp3:logging-interceptor:3.8.1' //REST API handling
//REST API handling compile('com.squareup.retrofit2:retrofit:2.3.0') {
compile('com.squareup.retrofit2:retrofit:2.3.0') { exclude module: 'okhttp'
exclude module: 'okhttp' }
} compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0' compile 'com.squareup.retrofit2:adapter-rxjava:2.3.0'
compile 'com.squareup.retrofit2:adapter-rxjava:2.3.0' //Crash Logging
//Crash Logging releaseCompile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
releaseCompile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') { transitive = true;
transitive = true; }
} // View Elements Binding :)
// View Elements Binding :) compile 'com.jakewharton:butterknife:8.6.0'
compile 'com.jakewharton:butterknife:8.6.0' apt 'com.jakewharton:butterknife-compiler:8.6.0'
apt 'com.jakewharton:butterknife-compiler:8.6.0' //Dependency Injection
//Dependency Injection compile 'com.google.dagger:dagger:2.11'
compile 'com.google.dagger:dagger:2.11' apt 'com.google.dagger:dagger-compiler:2.11'
apt 'com.google.dagger:dagger-compiler:2.11' provided 'org.glassfish:javax.annotation:10.0-b28'
provided 'org.glassfish:javax.annotation:10.0-b28' //App Compatibility and Material Design
//App Compatibility and Material Design compile('com.mikepenz:materialdrawer:5.8.3@aar') {
compile('com.mikepenz:materialdrawer:5.8.3@aar') { transitive = true
transitive = true }
} compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:appcompat-v7:25.3.1' compile 'com.android.support:design:25.3.1'
compile 'com.android.support:design:25.3.1' compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1' compile 'com.android.support:preference-v14:25.3.1'
compile 'com.android.support:preference-v14:25.3.1' compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:multidex:1.0.1' //QR Code
//QR Code compile 'com.github.kenglxn.QRGen:android:2.2.0'
compile 'com.github.kenglxn.QRGen:android:2.2.0' // Emojis
// Emojis compile 'com.github.viirus:emoji-lib:0.0.5'
compile 'com.github.viirus:emoji-lib:0.0.4' // Markdown
// Markdown compile 'com.commonsware.cwac:anddown:0.3.0'
compile 'com.commonsware.cwac:anddown:0.3.0' // About View for all dependent Libraries, we are using
// About View for all dependent Libraries, we are using compile('com.mikepenz:aboutlibraries:5.9.4@aar') {
compile('com.mikepenz:aboutlibraries:5.9.4@aar') { transitive = true
transitive = true }
} // a better fab alternative
// a better fab alternative compile 'com.github.clans:fab:1.6.4'
compile 'com.github.clans:fab:1.6.4' //Eventbus
//Eventbus compile 'org.greenrobot:eventbus:3.0.0'
compile 'org.greenrobot:eventbus:3.0.0' // IAP Handling / Verification
// IAP Handling / Verification compile 'org.solovyev.android:checkout:1.0.1'
compile 'org.solovyev.android:checkout:1.0.1' //Facebook
//Facebook compile('com.facebook.android:facebook-android-sdk:4.19.0') {
compile('com.facebook.android:facebook-android-sdk:4.19.0') { transitive = true
transitive = true }
} compile 'fr.avianey.com.viewpagerindicator:library:2.4.1@aar'
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1@aar' // lodash/underscore
// lodash/underscore compile 'com.github.javadev:underscore:1.23'
compile 'com.github.javadev:underscore:1.23' //RxJava
//RxJava compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex:rxandroid:1.2.1' compile 'io.reactivex:rxjava:1.3.0'
compile 'io.reactivex:rxjava:1.3.0' //Analytics
//Analytics compile 'com.amplitude:android-sdk:2.13.3'
compile 'com.amplitude:android-sdk:2.13.3' // Fresco Image Management Library
// Fresco Image Management Library compile('com.facebook.fresco:fresco:1.3.0') {
compile('com.facebook.fresco:fresco:1.3.0') { exclude module: 'bolts-android'
exclude module: 'bolts-android' }
} compile('com.facebook.fresco:animated-gif:1.3.0') {
compile('com.facebook.fresco:animated-gif:1.3.0') { exclude module: 'bolts-android'
exclude module: 'bolts-android' }
} //Tests
//Tests testCompile 'junit:junit:4.10'
testCompile 'junit:junit:4.10' testCompile 'org.assertj:assertj-core:1.7.0'
testCompile 'org.assertj:assertj-core:1.7.0' testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1' testCompile 'org.robolectric:robolectric:3.3.2'
testCompile 'org.robolectric:robolectric:3.3.2' testCompile 'org.robolectric:shadows-multidex:3.3.2'
testCompile 'org.robolectric:shadows-multidex:3.3.2' testCompile 'org.robolectric:shadows-support-v4:3.3.2'
testCompile 'org.robolectric:shadows-support-v4:3.3.2' testCompile 'org.mockito:mockito-core:2.8.9'
testCompile 'org.mockito:mockito-core:2.8.9' testCompile 'org.powermock:powermock-api-mockito2:1.7.0'
testCompile 'org.powermock:powermock-api-mockito2:1.7.0' testCompile 'org.powermock:powermock-module-junit4-rule-agent:1.7.0'
testCompile 'org.powermock:powermock-module-junit4-rule-agent:1.7.0' testCompile 'org.powermock:powermock-module-junit4-rule:1.7.0'
testCompile 'org.powermock:powermock-module-junit4-rule:1.7.0' testCompile 'org.powermock:powermock-module-junit4:1.7.0'
testCompile 'org.powermock:powermock-module-junit4:1.7.0' //Leak Detection
//Leak Detection debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1'
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1' releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1' //Push Notifications
//Push Notifications compile 'com.google.firebase:firebase-core:10.2.0'
compile 'com.google.firebase:firebase-core:10.2.0' compile 'com.google.firebase:firebase-messaging:10.2.0'
compile 'com.google.firebase:firebase-messaging:10.2.0' compile 'com.google.android.gms:play-services-auth:10.2.0'
compile 'com.google.android.gms:play-services-auth:10.2.0' compile 'org.apmem.tools:layouts:1.10@aar'
compile 'org.apmem.tools:layouts:1.10@aar' compile 'com.roughike:bottom-bar:2.3.1'
compile 'com.roughike:bottom-bar:2.3.1' compile 'io.realm:android-adapters:2.1.0'
compile 'io.realm:android-adapters:2.1.0' compile(project(':seeds-sdk')) {
compile(project(':seeds-sdk')) { exclude group: 'com.google.android.gms'
exclude group: 'com.google.android.gms' exclude group: 'com.android.support', module: 'multidex'
exclude group: 'com.android.support', module: 'multidex' }
} }
}
android {
android { compileSdkVersion 25
compileSdkVersion 25 buildToolsVersion "25.0.3"
buildToolsVersion "25.0.3"
defaultConfig {
defaultConfig { applicationId "com.habitrpg.android.habitica"
applicationId "com.habitrpg.android.habitica" vectorDrawables.useSupportLibrary = true
vectorDrawables.useSupportLibrary = true buildConfigField "String", "STORE", "\"google\""
buildConfigField "String", "STORE", "\"google\"" }
}
lintOptions {
lintOptions { abortOnError false
abortOnError false }
} signingConfigs {
signingConfigs { release
release }
}
buildTypes {
buildTypes { debug {
debug { applicationIdSuffix ".debug"
applicationIdSuffix ".debug" debuggable true
debuggable true multiDexEnabled true
multiDexEnabled true minifyEnabled false
// Disable fabric build ID generation for debug builds proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
ext.enableCrashlytics = false // Disable fabric build ID generation for debug builds
ext.alwaysUpdateBuildId = false ext.enableCrashlytics = false
resValue "string", "content_provider", "com.habitrpg.android.habitica.debug.fileprovider" ext.alwaysUpdateBuildId = false
resValue "string", "app_name", "Habitica Debug" resValue "string", "content_provider", "com.habitrpg.android.habitica.debug.fileprovider"
} resValue "string", "app_name", "Habitica Debug"
release { }
signingConfig signingConfigs.release release {
debuggable false signingConfig signingConfigs.release
multiDexEnabled true debuggable false
resValue "string", "content_provider", "com.habitrpg.android.habitica.fileprovider" multiDexEnabled false
resValue "string", "app_name", "Habitica" minifyEnabled true
} proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
} resValue "string", "content_provider", "com.habitrpg.android.habitica.fileprovider"
resValue "string", "app_name", "Habitica"
productFlavors { }
dev { }
minSdkVersion 21
} productFlavors {
dev {
prod { minSdkVersion 21
} }
amazon { prod {
buildConfigField "String", "STORE", "\"amazon\"" }
}
} amazon {
buildConfigField "String", "STORE", "\"amazon\""
sourceSets { }
main { }
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src/main/java'] sourceSets {
resources.srcDirs = ['src/main/java'] main {
aidl.srcDirs = ['src/main/java'] manifest.srcFile 'AndroidManifest.xml'
renderscript.srcDirs = ['src/main/java'] java.srcDirs = ['src/main/java']
res.srcDirs = ['res'] resources.srcDirs = ['src/main/java']
assets.srcDirs = ['assets'] aidl.srcDirs = ['src/main/java']
} renderscript.srcDirs = ['src/main/java']
robolectric { res.srcDirs = ['res']
manifest.srcFile 'AndroidManifestTesting.xml' assets.srcDirs = ['assets']
java.srcDir file('src/test/java/') }
res.srcDirs = ['res'] robolectric {
} manifest.srcFile 'AndroidManifestTesting.xml'
instrumentTest.setRoot('tests') java.srcDir file('src/test/java/')
release { java.srcDirs = ['src/release/java'] } res.srcDirs = ['res']
} }
instrumentTest.setRoot('tests')
compileOptions { release { java.srcDirs = ['src/release/java'] }
sourceCompatibility JavaVersion.VERSION_1_8 }
targetCompatibility JavaVersion.VERSION_1_8
} compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
dexOptions { targetCompatibility JavaVersion.VERSION_1_8
preDexLibraries false }
javaMaxHeapSize "6g" // Use gig increments depending on needs
} dexOptions {
preDexLibraries false
lintOptions { javaMaxHeapSize "6g" // Use gig increments depending on needs
disable 'UnusedResources','MissingTranslation','UnusedAttribute','InvalidPackage' }
enable 'LogConditional','IconExpectedSize','MissingRegistered','TypographyQuotes'
} lintOptions {
} disable 'MissingTranslation','InvalidPackage'
enable 'LogConditional','IconExpectedSize','MissingRegistered','TypographyQuotes'
def Properties props = new Properties() }
def propFile = new File('signingrelease.properties')
if (propFile.canRead()) { splits {
props.load(new FileInputStream(propFile)) abi {
enable true
if (props != null && props.containsKey('STORE_FILE') && props.containsKey('STORE_PASSWORD') && reset()
props.containsKey('KEY_ALIAS') && props.containsKey('KEY_PASSWORD')) { include 'armeabi-v7a', 'arm64-v8a', 'mips', 'x86', 'x86_64'
android.signingConfigs.release.storeFile = file(props['STORE_FILE']) universalApk true
android.signingConfigs.release.storePassword = props['STORE_PASSWORD'] }
android.signingConfigs.release.keyAlias = props['KEY_ALIAS'] }
android.signingConfigs.release.keyPassword = props['KEY_PASSWORD'] }
} else {
println 'signing.properties found but some entries are missing' def Properties props = new Properties()
android.buildTypes.release.signingConfig = null def propFile = new File('signingrelease.properties')
} if (propFile.canRead()) {
} else { props.load(new FileInputStream(propFile))
println 'signing.properties not found'
android.buildTypes.release.signingConfig = null if (props != null && props.containsKey('STORE_FILE') && props.containsKey('STORE_PASSWORD') &&
} props.containsKey('KEY_ALIAS') && props.containsKey('KEY_PASSWORD')) {
android.signingConfigs.release.storeFile = file(props['STORE_FILE'])
// Add Habitica Properties to buildConfigField android.signingConfigs.release.storePassword = props['STORE_PASSWORD']
final File HRPG_PROPS_FILE = new File('habitica.properties') android.signingConfigs.release.keyAlias = props['KEY_ALIAS']
if (HRPG_PROPS_FILE.canRead()) { android.signingConfigs.release.keyPassword = props['KEY_PASSWORD']
def Properties HRPG_PROPS = new Properties() } else {
HRPG_PROPS.load(new FileInputStream(HRPG_PROPS_FILE)) println 'signing.properties found but some entries are missing'
android.buildTypes.release.signingConfig = null
if (HRPG_PROPS != null) { }
android.buildTypes.all { buildType -> } else {
HRPG_PROPS.any { property -> println 'signing.properties not found'
buildType.buildConfigField "String", property.key, "\"${property.value}\"" android.buildTypes.release.signingConfig = null
} }
}
} else { // Add Habitica Properties to buildConfigField
throw new InvalidUserDataException('habitica.properties found but some entries are missing') final File HRPG_PROPS_FILE = new File('habitica.properties')
} if (HRPG_PROPS_FILE.canRead()) {
} else { def Properties HRPG_PROPS = new Properties()
throw new MissingResourceException('habitica.properties not found') HRPG_PROPS.load(new FileInputStream(HRPG_PROPS_FILE))
}
if (HRPG_PROPS != null) {
// Add Habitica Resources to resources android.buildTypes.all { buildType ->
final File HRPG_RES_FILE = new File('habitica.resources') HRPG_PROPS.any { property ->
if (HRPG_RES_FILE.canRead()) { buildType.buildConfigField "String", property.key, "\"${property.value}\""
def Properties HRPG_RES = new Properties() }
HRPG_RES.load(new FileInputStream(HRPG_RES_FILE)) }
} else {
if (HRPG_RES != null) { throw new InvalidUserDataException('habitica.properties found but some entries are missing')
android.buildTypes.all { buildType -> }
HRPG_RES.any { property -> } else {
buildType.resValue "string", property.key, "\"${property.value}\"" throw new MissingResourceException('habitica.properties not found')
} }
}
} else { // Add Habitica Resources to resources
throw new InvalidUserDataException('habitica.resources found but some entries are missing') final File HRPG_RES_FILE = new File('habitica.resources')
} if (HRPG_RES_FILE.canRead()) {
} else { def Properties HRPG_RES = new Properties()
throw new MissingResourceException('habitica.resources not found') HRPG_RES.load(new FileInputStream(HRPG_RES_FILE))
}
if (HRPG_RES != null) {
tasks.whenTaskAdded { task -> android.buildTypes.all { buildType ->
if (task.name == "lint") { HRPG_RES.any { property ->
task.enabled = false buildType.resValue "string", property.key, "\"${property.value}\""
} }
} }
} else {
check { findbugs { skip true } } throw new InvalidUserDataException('habitica.resources found but some entries are missing')
}
apply plugin: 'com.android.application' //or apply plugin: 'java' } else {
apply plugin: 'me.tatarka.retrolambda' throw new MissingResourceException('habitica.resources not found')
apply plugin: 'com.google.gms.google-services' }
tasks.whenTaskAdded { task ->
if (task.name == "lint") {
task.enabled = false
}
}
check { findbugs { skip true } }
apply plugin: 'com.android.application' //or apply plugin: 'java'
apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'com.google.gms.google-services'

View file

@ -1,20 +0,0 @@
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# 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 *;
#}

180
Habitica/proguard-rules.pro vendored Normal file
View file

@ -0,0 +1,180 @@
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# 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 *;
#}
-keepattributes Signature
-keepattributes *Annotation*
-keepattributes Exceptions
-keep class sun.misc.Unsafe { *; }
#retrolambda
-dontwarn java.lang.invoke.*
-dontwarn sun.misc.**
#rxJava
-keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
long producerIndex;
long consumerIndex;
}
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
rx.internal.util.atomic.LinkedQueueNode producerNode;
}
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
rx.internal.util.atomic.LinkedQueueNode consumerNode;
}
#OkHttp
-keep class okhttp3.** { *; }
-keep,includedescriptorclasses class okio.Source
-keep,includedescriptorclasses class okio.okio.Buffer
-keep interface okhttp3.** { *; }
-dontwarn okhttp3.**
#retrofit
-dontwarn retrofit2.**
-keep class retrofit2.** { *; }
-keepclasseswithmembers class * {
@retrofit2.http.* <methods>;
}
#gson
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer
#keep models
-keep class com.habitrpg.android.habitica.models.** { *; }
#realm
-keep class io.realm.annotations.RealmModule
-keep @io.realm.annotations.RealmModule class *
-keep class io.realm.internal.Keep
-keep @io.realm.internal.Keep class *
-dontwarn javax.**
-dontwarn io.realm.**
#support library
-keep class android.support.v7.widget.SearchView { *; }
#eventbus
-keepclassmembers class ** {
@org.greenrobot.eventbus.Subscribe <methods>;
}
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
# Only required if you use AsyncExecutor
-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
<init>(java.lang.Throwable);
}
#crashlytic
-keepattributes SourceFile,LineNumberTable
-keep public class * extends java.lang.Exception
-keep class com.crashlytics.** { *; }
-dontwarn com.crashlytics.**
#fresko
# Keep our interfaces so they can be used by other ProGuard rules.
# See http://sourceforge.net/p/proguard/bugs/466/
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
# Do not strip any method/class that is annotated with @DoNotStrip
-keep @com.facebook.common.internal.DoNotStrip class *
-keepclassmembers class * {
@com.facebook.common.internal.DoNotStrip *;
}
# Keep native methods
-keepclassmembers class * {
native <methods>;
}
# Keep our interfaces so they can be used by other ProGuard rules.
# See http://sourceforge.net/p/proguard/bugs/466/
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
# Do not strip any method/class that is annotated with @DoNotStrip
-keep @com.facebook.common.internal.DoNotStrip class *
-keepclassmembers class * {
@com.facebook.common.internal.DoNotStrip *;
}
# Keep native methods
-keepclassmembers class * {
native <methods>;
}
#end fresko
#amplitude
-keep class com.google.android.gms.ads.** { *; }
#end amplitude
#playservices
-keep class * extends java.util.ListResourceBundle {
protected Object[][] getContents();
}
-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
public static final *** NULL;
}
-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
@com.google.android.gms.common.annotation.KeepName *;
}
-keepnames class * implements android.os.Parcelable {
public static final ** CREATOR;
}
-keep class com.google.android.gms.** { *; }
-dontwarn com.google.android.gms.**
#end playservices
#checkout
-keep class com.android.vending.billing.**
#seeds sdk
-keep class com.playseeds.** { *; }
-assumenosideeffects class org.solovyev.android.checkout.Billing {
public static void debug(...);
public static void warning(...);
public static void error(...);
}
-assumenosideeffects class org.solovyev.android.checkout.Check {
static *;
}
#end chekout
#add warnings here, warnings in proguard is normal
-dontwarn javax.annotation.**
-dontwarn com.squareup.picasso.**
-dontwarn okio.**
-dontwarn rx.**
-dontwarn com.android.volley.toolbox.**
-dontwarn com.facebook.infer.**
-dontwarn com.roughike.bottombar.**
-dontwarn com.viewpagerindicator.**
#-ignorewarnings

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1,003 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 973 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 992 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 743 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1,016 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 297 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 974 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 769 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

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