Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
* dev: (22 commits)
  update whatsnew for v3.1.0 release
  minor fix for PurchaseEvent in Timetable adapter
  add response caching and offline caching for verfiy api
  Timetable: update TimetableAdapter on purchase event
  remove references to ads until they are implemented
  Pro mode: unpersonalise pref strings
  update travis.yml
  revert back to the public API url and add a test
  add offline response caching for okHttp
  Rxify BillingManager with server side purchase verification
  implement IAP for ProKey with infinite retry for billingclient
  seperatly handle client and server network errors
  use a static summary for night theme and hide weekends pref
  add initial donation/pro mode preference
  remove timetable notification preference
  LoggingInterceptor: log out status code
  optout of GA on Debug build
  gradle: update support libraries
  invert show weekends preference
  fix scrolling to date when weekends are disabled
  ...
  • Loading branch information
shalzz committed Apr 22, 2018
2 parents 524cce7 + e47fe7b commit f202f12
Show file tree
Hide file tree
Showing 52 changed files with 1,045 additions and 1,971 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ android:
- tools
- platform-tools
- build-tools-27.0.3
- android-23
- android-27
- extra-android-m2repository
- extra-google-google_play_services
- extra-google-m2repository
Expand Down
22 changes: 15 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ def gitCommitCount = 2007000 +
Integer.parseInt('git rev-list --count HEAD'.execute([], project.rootDir).text.trim())

android {
compileSdkVersion 23
compileSdkVersion 27
buildToolsVersion '27.0.3'

defaultConfig {
applicationId 'com.shalzz.attendance'
minSdkVersion 14
targetSdkVersion 23
targetSdkVersion 27
versionCode gitCommitCount
versionName gitTag

Expand Down Expand Up @@ -129,24 +129,32 @@ android {
}

dependencies {
final SUPPORT_LIBRARY_VERSION = '23.4.0'
final SUPPORT_LIBRARY_VERSION = '27.1.1'
final DAGGER_VERSION = '2.5'
final ESPRESSO_VERSION = '2.2.1'
final RUNNER_VERSION = '0.4'
final RETROFIT_VERSION = '2.2.0'
final RETROFIT_VERSION = '2.4.0'
final BUTTERKNIFE_VERSION = '8.4.0'
final AUTO_VALUE_VERSION = '1.5'
final AUTO_VALUE_GSON_VERSION = '0.7.0'
final AUTO_VALUE_PARCEL_VERSION = '0.2.5'

implementation "com.google.android.gms:play-services-analytics:9.4.0"

implementation "com.android.support:support-compat:$SUPPORT_LIBRARY_VERSION"
implementation "com.android.support:support-core-utils:$SUPPORT_LIBRARY_VERSION"
implementation "com.android.support:support-core-ui:$SUPPORT_LIBRARY_VERSION"
implementation "com.android.support:support-fragment:$SUPPORT_LIBRARY_VERSION"
implementation "com.android.support:appcompat-v7:$SUPPORT_LIBRARY_VERSION"
implementation "com.android.support:recyclerview-v7:$SUPPORT_LIBRARY_VERSION"
implementation "com.android.support:design:$SUPPORT_LIBRARY_VERSION"
implementation "com.android.support:support-v4:$SUPPORT_LIBRARY_VERSION"
implementation "com.android.support:appcompat-v7:$SUPPORT_LIBRARY_VERSION"
implementation "com.android.support:preference-v7:$SUPPORT_LIBRARY_VERSION"
implementation "com.android.support:preference-v14:$SUPPORT_LIBRARY_VERSION"
implementation "com.android.support:support-annotations:25.3.1"
implementation "com.android.support:support-annotations:$SUPPORT_LIBRARY_VERSION"
implementation "com.android.support:design:$SUPPORT_LIBRARY_VERSION"
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.billingclient:billing:1.0'

implementation "android.arch.persistence:db:1.0.0"
implementation "android.arch.persistence:db-framework:1.0.0"
Expand Down Expand Up @@ -199,7 +207,7 @@ android {
// Instrumentation test dependencies
androidTestImplementation jUnit
androidTestImplementation mockito
androidTestImplementation "com.android.support:support-annotations:25.3.1"
androidTestImplementation "com.android.support:support-annotations:$SUPPORT_LIBRARY_VERSION"
androidTestImplementation("com.android.support.test.espresso:espresso-contrib:$ESPRESSO_VERSION")
androidTestImplementation "com.android.support.test.espresso:espresso-core:$ESPRESSO_VERSION"
androidTestImplementation "com.android.support.test:runner:$RUNNER_VERSION"
Expand Down
11 changes: 6 additions & 5 deletions app/proguard/proguard-square-okhttp3.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# OkHttp
-keepattributes Signature
-keepattributes *Annotation*
-keep class okhttp3.** { *; }
-keep interface okhttp3.** { *; }
-dontwarn okhttp3.**
-dontwarn okhttp3.**
-dontwarn okio.**
-dontwarn javax.annotation.**
-dontwarn org.conscrypt.**
# A resource is loaded with a relative path so the package of this class must be preserved.
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
5 changes: 0 additions & 5 deletions app/proguard/proguard-square-okio.pro

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS"/>
<uses-permission android:name="com.android.vending.BILLING" />

<!-- Get permission for reliable local dispatching on non-Google Play devices. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion app/src/main/java/com/shalzz/attendance/MyApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void onCreate() {
Timber.plant(new BugsnagTree());

int nightMode = Integer.parseInt(sharedPref.getString(
getString(R.string.pref_key_day_night), "-1"));
getString(R.string.pref_key_day_night), "1"));
//noinspection WrongConstant
AppCompatDelegate.setDefaultNightMode(nightMode);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Copyright 2017 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.shalzz.attendance.billing;

import com.android.billingclient.api.BillingClient;
import com.android.billingclient.api.BillingClient.SkuType;
import java.util.Arrays;
import java.util.List;

/**
* Static fields and methods useful for billing
*/
public final class BillingConstants {
// SKUs for our products: the premium upgrade (non-consumable) and gas (consumable)
public static final String SKU_PRO_KEY = "pro_key";
public static final String SKU_DONATION_200 = "donation_200";
public static final String SKU_DONATION_250 = "donation_250";

// SKU for our subscription

private static final String[] IN_APP_SKUS = {SKU_PRO_KEY, SKU_DONATION_200, SKU_DONATION_250};
private static final String[] SUBSCRIPTIONS_SKUS = {};

private BillingConstants(){}

/**
* Returns the list of all SKUs for the billing type specified
*/
public static final List<String> getSkuList(@BillingClient.SkuType String billingType) {
return (billingType == SkuType.INAPP) ? Arrays.asList(IN_APP_SKUS)
: Arrays.asList(SUBSCRIPTIONS_SKUS);
}
}

Loading

0 comments on commit f202f12

Please sign in to comment.