diff --git a/.github/prepare-workflow b/.github/prepare-workflow index 7e117d5fa..ba73ad72e 100755 --- a/.github/prepare-workflow +++ b/.github/prepare-workflow @@ -1,4 +1,5 @@ chmod +x gradlew cp habitica.properties.example habitica.properties cp habitica.resources.example habitica.resources -cp Habitica/google-services.json.example Habitica/google-services.json \ No newline at end of file +cp Habitica/google-services.json.example Habitica/google-services.json +cp Habitica/google-services.json.example wearos/google-services.json diff --git a/Habitica/build.gradle b/Habitica/build.gradle index 93ac09aa7..9886eeef7 100644 --- a/Habitica/build.gradle +++ b/Habitica/build.gradle @@ -5,12 +5,12 @@ plugins { id 'com.google.gms.google-services' id 'com.google.firebase.crashlytics' - id 'realm-android' id 'androidx.navigation.safeargs' id 'com.google.firebase.firebase-perf' } apply plugin: 'kotlin-android' +apply plugin: "realm-android" repositories { mavenLocal() @@ -26,7 +26,7 @@ configurations { } dependencies { - implementation fileTree(include: ['*.jar'], dir: 'libs') + implementation fileTree(include: ['*.jar'], dir: '../common/libs') //Networking implementation "com.squareup.okhttp3:okhttp:$okhttp_version" implementation "com.squareup.okhttp3:logging-interceptor:$okhttp_version" @@ -78,7 +78,7 @@ dependencies { androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' androidTestImplementation 'androidx.test:runner:1.4.0' androidTestImplementation 'androidx.test:rules:1.4.0' - debugImplementation 'androidx.fragment:fragment-testing:1.4.1' + debugImplementation 'androidx.fragment:fragment-testing:1.5.0' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test:core-ktx:1.4.0' androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.3' @@ -108,15 +108,13 @@ dependencies { implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version" - implementation 'androidx.navigation:navigation-fragment-ktx:2.4.2' - implementation 'androidx.navigation:navigation-ui-ktx:2.4.2' - implementation "androidx.fragment:fragment-ktx:1.4.1" + implementation 'androidx.navigation:navigation-fragment-ktx:2.5.0' + implementation 'androidx.navigation:navigation-ui-ktx:2.5.0' + implementation "androidx.fragment:fragment-ktx:1.5.0" implementation "androidx.paging:paging-runtime-ktx:3.1.1" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version" - coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.6' - implementation 'com.willowtreeapps:signinwithapplebutton:0.3' implementation project(':shared') @@ -129,7 +127,6 @@ dependencies { } androidTestImplementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - } android { @@ -150,9 +147,6 @@ android { buildConfigField "String", "TESTING_LEVEL", "\"production\"" resConfigs 'en', 'bg', 'de', 'en-rGB', 'es', 'fr', 'hr-rHR', 'in', 'it', 'iw', 'ja', 'ko', 'lt', 'nl', 'pl', 'pt-rBR', 'pt-rPT', 'ru', 'tr', 'zh', 'zh-rTW' - println app_version_code - println app_version_name - versionCode app_version_code versionName app_version_name @@ -160,6 +154,9 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunnerArguments clearPackageData: 'true' + + def formattedDate = new Date().format('yyMMdd') + archivesBaseName = "Habitica-${formattedDate}${versionCode}" } buildFeatures { @@ -215,6 +212,13 @@ android { dimension "buildType" buildConfigField "String", "TESTING_LEVEL", "\"staff\"" resValue "string", "app_name", "Habitica Staff" + versionCode app_version_code + 8 + } + + partners { + dimension "buildType" + buildConfigField "String", "TESTING_LEVEL", "\"partners\"" + resValue "string", "app_name", "Habitica" versionCode app_version_code + 6 } @@ -260,9 +264,6 @@ android { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 - - // Flag to enable support for the new language APIs - coreLibraryDesugaringEnabled true } kotlinOptions { diff --git a/Habitica/proguard-rules.pro b/Habitica/proguard-rules.pro index 15e1ba3a7..f57461c2a 100644 --- a/Habitica/proguard-rules.pro +++ b/Habitica/proguard-rules.pro @@ -97,21 +97,6 @@ -keepclassmembers class * { native ; } -# 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 ; -} -#end fresko #amplitude -keep class com.google.android.gms.ads.** { *; } @@ -138,20 +123,6 @@ -dontwarn com.google.android.gms.** #end playservices -#checkout --keep class com.android.vending.billing.** - --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.** diff --git a/Habitica/res/layout/activity_adventure_guide.xml b/Habitica/res/layout/activity_adventure_guide.xml index c0bb45254..c3bc9ccbc 100644 --- a/Habitica/res/layout/activity_adventure_guide.xml +++ b/Habitica/res/layout/activity_adventure_guide.xml @@ -41,7 +41,7 @@ android:src="@drawable/adventure_guide_art" /> - diff --git a/Habitica/res/layout/activity_full_profile.xml b/Habitica/res/layout/activity_full_profile.xml index 7e14d606a..fe543b7aa 100644 --- a/Habitica/res/layout/activity_full_profile.xml +++ b/Habitica/res/layout/activity_full_profile.xml @@ -103,7 +103,7 @@ android:layout_weight="1" android:layout_height="wrap_content" android:text="@string/joined" - style="@style/Subheader1"/> + style="@style/SubHeader1"/> + style="@style/SubHeader1"/> + style="@style/SubHeader1"/> - - + style="@style/SubHeader1" /> + style="@style/SubHeader1" /> + style="@style/SubHeader1" /> - diff --git a/Habitica/res/layout/chat_item.xml b/Habitica/res/layout/chat_item.xml index f892e641f..b5b158ed5 100644 --- a/Habitica/res/layout/chat_item.xml +++ b/Habitica/res/layout/chat_item.xml @@ -35,7 +35,7 @@ - - - - diff --git a/Habitica/res/layout/dialog_hatch_pet_button.xml b/Habitica/res/layout/dialog_hatch_pet_button.xml index 7ab09a57f..1fa18d8aa 100644 --- a/Habitica/res/layout/dialog_hatch_pet_button.xml +++ b/Habitica/res/layout/dialog_hatch_pet_button.xml @@ -1,10 +1,12 @@ + android:gravity="center" + android:padding="6dp"> - + android:layout_height="wrap_content" + app:fontFamily="sans-serif-medium"/> \ No newline at end of file diff --git a/Habitica/res/layout/dialog_insufficient_gems.xml b/Habitica/res/layout/dialog_insufficient_gems.xml index 5d9029955..5672879bc 100644 --- a/Habitica/res/layout/dialog_insufficient_gems.xml +++ b/Habitica/res/layout/dialog_insufficient_gems.xml @@ -33,7 +33,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" - style="@style/Subheader1" + style="@style/SubHeader1" tools:text="4 Gems" android:gravity="center"/>