Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/anilist first #81

Merged
merged 4 commits into from
Apr 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 12 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
plugins {

id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
Expand All @@ -10,6 +9,7 @@ plugins {
id 'com.google.firebase.crashlytics'
id 'com.google.secrets_gradle_plugin' version("0.4")
id "com.apollographql.apollo3" version("3.0.0")
id 'com.onesignal.androidsdk.onesignal-gradle-plugin'
}
android {
signingConfigs {
Expand All @@ -25,16 +25,15 @@ android {
applicationId "com.kl3jvi.animity"
minSdk 21
targetSdk 32
versionCode 6
versionName "1.0.5"
versionCode 7
versionName "1.0.6"
archivesBaseName = "Animity-v$versionName"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
shrinkResources false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
debuggable true
signingConfig signingConfigs.release
Expand Down Expand Up @@ -71,7 +70,9 @@ android {
universalApk true
}
}

lintOptions {
checkReleaseBuilds false
}
}
kapt {
correctErrorTypes = true
Expand All @@ -85,6 +86,7 @@ apollo {

dependencies {
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
def coordinatorLayoutVersion = "1.2.0"
implementation "androidx.coordinatorlayout:coordinatorlayout:$coordinatorLayoutVersion"
def androidCoreVersion = "1.7.0"
Expand Down Expand Up @@ -136,9 +138,11 @@ dependencies {
// Retrofit
def retrofitVersion = "2.9.0"
def interceptor_version = "5.0.0-alpha.4"
def dnsOverHttp = "5.0.0-alpha.4"
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
implementation "com.squareup.okhttp3:logging-interceptor:$interceptor_version"
implementation "com.squareup.okhttp3:okhttp-dnsoverhttps:$dnsOverHttp"

//Html Parsing
def jsoupVersion = "1.13.1"
Expand All @@ -153,6 +157,7 @@ dependencies {
def exoplayerVersion = "2.17.1"
implementation "com.google.android.exoplayer:exoplayer:$exoplayerVersion"
implementation "com.google.android.exoplayer:extension-cast:$exoplayerVersion"
implementation "com.google.android.exoplayer:extension-okhttp:$exoplayerVersion"
implementation "com.google.android.exoplayer:extension-mediasession:$exoplayerVersion"

//Bottom bar
Expand Down Expand Up @@ -210,5 +215,6 @@ dependencies {
implementation "com.airbnb.android:epoxy-paging3:$epoxyVersion"
kapt "com.airbnb.android:epoxy-processor:$epoxyVersion"

implementation 'com.onesignal:OneSignal:[4.0.0, 4.99.99]'

}
155 changes: 81 additions & 74 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,76 +1,83 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# 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 *;
## Add project specific ProGuard rules here.
## You can control the set of applied configuration files using the
## proguardFiles setting in build.gradle.kts.
##
## For more details, see
## http://developer.android.com/guide/developing/tools/proguard.html
#
## 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 *;
##}
#
## Uncomment this to preserve the line number information for
## debugging stack traces.
##-keepattributes SourceFile,LineNumberTable
#
## If you keep the line number information, uncomment this to
## hide the original source file name.
##-renamesourcefileattribute SourceFile
#
#-keep class * extends androidx.room.RoomDatabase
#-keep @androidx.room.Entity class *
#-dontwarn androidx.room.paging.**
#
## Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and
## EnclosingMethod is required to use InnerClasses.
#-keepattributes Signature, InnerClasses, EnclosingMethod
#
## Retrofit does reflection on method and parameter annotations.
#-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
#
## Keep annotation default values (e.g., retrofit2.http.Field.encoded).
#-keepattributes AnnotationDefault
#
## Retain service method parameters when optimizing.
#-keepclassmembers,allowshrinking,allowobfuscation interface * {
# @retrofit2.http.* <methods>;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

-keep class * extends androidx.room.RoomDatabase
-keep @androidx.room.Entity class *
-dontwarn androidx.room.paging.**

# Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and
# EnclosingMethod is required to use InnerClasses.
-keepattributes Signature, InnerClasses, EnclosingMethod

# Retrofit does reflection on method and parameter annotations.
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations

# Keep annotation default values (e.g., retrofit2.http.Field.encoded).
-keepattributes AnnotationDefault

# Retain service method parameters when optimizing.
-keepclassmembers,allowshrinking,allowobfuscation interface * {
@retrofit2.http.* <methods>;
}

# Ignore annotation used for build tooling.
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement

# Ignore JSR 305 annotations for embedding nullability information.
-dontwarn javax.annotation.**

# Guarded by a NoClassDefFoundError try/catch and only used when on the classpath.
-dontwarn kotlin.Unit

# Top-level functions that can only be used by Kotlin.
-dontwarn retrofit2.KotlinExtensions
-dontwarn retrofit2.KotlinExtensions*

# With R8 full mode, it sees no subtypes of Retrofit interfaces since they are created with a Proxy
# and replaces all potential values with null. Explicitly keeping the interfaces prevents this.
-if interface * { @retrofit2.http.* <methods>; }
-keep,allowobfuscation interface <1>

# Keep generic signature of Call, Response (R8 full mode strips signatures from non-kept items).
-keep,allowobfuscation,allowshrinking interface retrofit2.Call
-keep,allowobfuscation,allowshrinking class retrofit2.Response

# With R8 full mode generic signatures are stripped for classes that are not
# kept. Suspend functions are wrapped in continuations where the type argument
# is used.
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation

# Accessed via menu.xml
-keep class androidx.mediarouter.app.MediaRouteActionProvider {
*;
#
## Ignore annotation used for build tooling.
#-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
#
## Ignore JSR 305 annotations for embedding nullability information.
#-dontwarn javax.annotation.**
#
## Guarded by a NoClassDefFoundError try/catch and only used when on the classpath.
#-dontwarn kotlin.Unit
#
## Top-level functions that can only be used by Kotlin.
#-dontwarn retrofit2.KotlinExtensions
#-dontwarn retrofit2.KotlinExtensions*
#
## With R8 full mode, it sees no subtypes of Retrofit interfaces since they are created with a Proxy
## and replaces all potential values with null. Explicitly keeping the interfaces prevents this.
#-if interface * { @retrofit2.http.* <methods>; }
#-keep,allowobfuscation interface <1>
#
## Keep generic signature of Call, Response (R8 full mode strips signatures from non-kept items).
#-keep,allowobfuscation,allowshrinking interface retrofit2.Call
#-keep,allowobfuscation,allowshrinking class retrofit2.Response
#
## With R8 full mode generic signatures are stripped for classes that are not
## kept. Suspend functions are wrapped in continuations where the type argument
## is used.
#-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
#
## Accessed via menu.xml
#-keep class androidx.mediarouter.app.MediaRouteActionProvider {
# *;
#}
#
#-keep class * extends com.airbnb.epoxy.EpoxyController { *; }
#-keep class * extends com.airbnb.epoxy.ControllerHelper { *; }
#-keepclasseswithmembernames class * { @com.airbnb.epoxy.AutoModel <fields>; }
-keep class com.kl3jvi.animity.data.model.ui_models.AniListMedia
-keep class com.kl3jvi.animity.data.model.ui_models.Review
-keep public class com.kl3jvi.animity.data.model.auth_models.AuthResponse {*;}
-keep public class com.kl3jvi.animity.data.model.ui_models.DetailedAnimeInfo
-keepclassmembers,allowobfuscation class * {
@com.google.gson.annotations.SerializedName <fields>;
}

-keep class * extends com.airbnb.epoxy.EpoxyController { *; }
-keep class * extends com.airbnb.epoxy.ControllerHelper { *; }
-keepclasseswithmembernames class * { @com.airbnb.epoxy.AutoModel <fields>; }
Binary file removed app/release/Animity-v1.0.5-release.aab
Binary file not shown.
34 changes: 17 additions & 17 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@
"type": "UNIVERSAL",
"filters": [],
"attributes": [],
"versionCode": 6,
"versionName": "1.0.5",
"outputFile": "Animity-v1.0.5-universal-release.apk"
"versionCode": 7,
"versionName": "1.0.6",
"outputFile": "Animity-v1.0.6-universal-release.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "x86_64"
"value": "arm64-v8a"
}
],
"attributes": [],
"versionCode": 6,
"versionName": "1.0.5",
"outputFile": "Animity-v1.0.5-x86_64-release.apk"
"versionCode": 7,
"versionName": "1.0.6",
"outputFile": "Animity-v1.0.6-arm64-v8a-release.apk"
},
{
"type": "ONE_OF_MANY",
Expand All @@ -37,22 +37,22 @@
}
],
"attributes": [],
"versionCode": 6,
"versionName": "1.0.5",
"outputFile": "Animity-v1.0.5-x86-release.apk"
"versionCode": 7,
"versionName": "1.0.6",
"outputFile": "Animity-v1.0.6-x86-release.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "arm64-v8a"
"value": "x86_64"
}
],
"attributes": [],
"versionCode": 6,
"versionName": "1.0.5",
"outputFile": "Animity-v1.0.5-arm64-v8a-release.apk"
"versionCode": 7,
"versionName": "1.0.6",
"outputFile": "Animity-v1.0.6-x86_64-release.apk"
},
{
"type": "ONE_OF_MANY",
Expand All @@ -63,9 +63,9 @@
}
],
"attributes": [],
"versionCode": 6,
"versionName": "1.0.5",
"outputFile": "Animity-v1.0.5-armeabi-v7a-release.apk"
"versionCode": 7,
"versionName": "1.0.6",
"outputFile": "Animity-v1.0.6-armeabi-v7a-release.apk"
}
],
"elementType": "File"
Expand Down
6 changes: 5 additions & 1 deletion app/src/main/graphql/Query.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -332,13 +332,14 @@ query HomeDataQuery {
}
}

review: Page(page: 1, perPage: 10) {
review: Page(page: 1, perPage: 15) {
reviews(sort: [ID_DESC]) {
id
userId
mediaId
mediaType
summary
body
rating
ratingAmount
score
Expand All @@ -356,6 +357,9 @@ query HomeDataQuery {
romaji
}
bannerImage
coverImage {
large
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import android.app.Application
import com.google.firebase.analytics.FirebaseAnalytics
import com.google.firebase.analytics.ktx.analytics
import com.google.firebase.ktx.Firebase
import com.kl3jvi.animity.utils.Constants.Companion.ONESIGNAL_APP_ID
import com.onesignal.OneSignal
import dagger.hilt.android.HiltAndroidApp

@HiltAndroidApp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.kl3jvi.animity.data.mapper

import com.kl3jvi.animity.FavoritesAnimeQuery
import com.kl3jvi.animity.data.model.ui_models.Media
import com.kl3jvi.animity.data.model.ui_models.AniListMedia
import com.kl3jvi.animity.data.model.ui_models.MediaCoverImage
import com.kl3jvi.animity.data.model.ui_models.MediaTitle

fun FavoritesAnimeQuery.Data.convert(): List<Media>? {
fun FavoritesAnimeQuery.Data.convert(): List<AniListMedia>? {
return user?.favourites?.anime?.edges?.map {
Media(
AniListMedia(
idAniList = it?.node?.id ?: 0,
title = MediaTitle(romaji = it?.node?.title?.romaji ?: ""),
coverImage = MediaCoverImage(large = it?.node?.coverImage?.large ?: ""),
Expand Down
Loading