Skip to content

Commit

Permalink
V1.4 (#44)
Browse files Browse the repository at this point in the history
* Updated readme assets.

* Bump versions

* Set compiler args to allow experimental time apis

* Refactor packages

* Refactor packages (2)

* Refactor packages (3)

* Fix moshi and agp incompatibility issue

* Fix light status bar on auth activity

* Code Refactoring (4)

* Fixes #42

* Invalid query for whitespace appended <3 length string

* Fixes #41

* Fixes #35

* Refactor function signature

* Move string parse logic to enum as static function

* Move parsing logic of args to AnimeSeasonWrapper

* Move to new days and hours extension

* Refactor to savedStateHandle to handle FragmentStateManager recreating view causing reload (1)

* Refactor to new anime status parse function signature

* Fixes #38

* Code refactoring

* Refactor to savedStateHandle to handle FragmentStateManager recreating view causing reload (2)

* Refactor to seconds and hours datetime extensions

* Refactor to savedStateHandle to handle FragmentStateManager recreating view causing reload (3)

* Moved to lastOrNull for paged flow collection

* Revert lastOrNull

* Refactor to savedStateHandle to handle FragmentStateManager recreating view causing reload (4)

* Refactor to savedStateHandle to handle FragmentStateManager recreating view causing reload (5)

* Refactored to use AnimeAndMangaGridSpanCount

* Refactor to savedStateHandle to handle FragmentStateManager recreating view causing reload (6)

* Refactor to savedStateHandle to handle FragmentStateManager recreating view causing reload (7)

* Fixed LoadStateListener not being cleaned up

* Refactor to savedStateHandle to handle FragmentStateManager recreating view causing reload (8)

* Code refactoring

* Refactor to savedStateHandle to handle FragmentStateManager recreating view causing reload (9)

* Code refactoring

* Refactor to savedStateHandle to handle FragmentStateManager recreating view causing reload (10)

* Code refactoring

* Refactor to savedStateHandle to handle FragmentStateManager recreating view causing reload (11)

* Refactor to savedStateHandle to handle FragmentStateManager recreating view causing reload (12)

* Closes #31

* Code refactoring

* Bump version name

* Fix invalid import for getLocalDateFromDayAndTime in UtilsTest

* Migrate to Robolectric for local unit testing instead of instrumentation tests.

* Make empty layout of search pages responsive

* Set fab size for search fab to maintain uniformity

* Add robolectric to readme

* Add support for landscape orientation

* Add support for landscape orientation (2)

* Code Refactoring (1)

* Code Refactoring, Refactor packages, Add missing imports.

* Make app work in split screen

* Up deps

* Fix coil function signature changing

* Set search fields to single line

* Fix di

* Remove acra

* Migrate to Apollo 3

* Add graphql query alias to prevent name shadowing

* Move to target and compile sdk 32

* Up dependencies

* Add share button to both anime and mana details page

* Alphabetically order version variables

* Set apollo generated package to com.sharkaboi.mediahub

* Disable final-newline ktlint rule

* lint format

* Make bottom navigation not auto hide, move search fabs to individual fragments, make root as ConstraintLayout

* Make grid span be considered from constants.xml

* Remove unwanted margin

* Code refactoring

* Revert versions to same as master

* Send empty paging data if null from paging source

* Up kotlin version to 1.7.0

* Make actions only run on pull requests and push to main/master

* Remove room deps

* Code refactoring

* Code refactoring anime_details

* Code refactoring manga_details

* Move to getCatchingPaging

* Move to getCatching

* Code refactoring

* ktlint format

* Fix capitalizeFirst

* Fix capitalizeFirst
  • Loading branch information
Sharkaboi authored Jun 11, 2022
1 parent 067d7a3 commit f79d36f
Show file tree
Hide file tree
Showing 192 changed files with 4,812 additions and 3,201 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/android.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Android CI

on: [ push, pull_request ]
on:
pull_request:
push:
branches:
- master
- main

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
* [Settings preference](https://developer.android.com/reference/androidx/preference/package-summary)
* [Coil](https://coil-kt.github.io/coil/)
* [Timber](https://github.com/JakeWharton/timber)
* [Robolectric](https://github.com/robolectric/robolectric)
* [ktlint-gradle](https://github.com/jlleitschuh/ktlint-gradle)
* [LeakCanary](https://square.github.io/leakcanary/)
* [Google secrets gradle plugin](https://github.com/google/secrets-gradle-plugin)
Expand Down
34 changes: 24 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,18 @@ plugins {
id 'com.google.android.gms.oss-licenses-plugin'
id 'androidx.navigation.safeargs.kotlin'
id 'org.jlleitschuh.gradle.ktlint'
id 'com.apollographql.apollo'
id 'com.apollographql.apollo3'
}

android {
compileSdkVersion 31
compileSdkVersion 32

defaultConfig {
applicationId "com.sharkaboi.mediahub"
minSdkVersion 23
targetSdkVersion 31
targetSdkVersion 32
versionCode 1
versionName "1.3"

versionName "1.4"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand All @@ -32,13 +31,17 @@ android {
'proguard-rules.pro'
}
}

compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = '11'
freeCompilerArgs += "-Xopt-in=kotlin.time.ExperimentalTime"
freeCompilerArgs += "-Xopt-in=kotlin.ExperimentalStdlibApi"
}

buildFeatures {
Expand All @@ -49,6 +52,12 @@ android {
propertiesFileName 'secrets.properties'
defaultPropertiesFileName = 'secrets.defaults.properties'
}

testOptions {
unitTests {
includeAndroidResources = true
}
}
}

dependencies {
Expand All @@ -68,9 +77,8 @@ dependencies {
//retrofit
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.okhttp3:logging-interceptor:$logging_version"
//apollo grahql client
implementation "com.apollographql.apollo:apollo-runtime:$apollo_version"
implementation "com.apollographql.apollo:apollo-coroutines-support:$apollo_version"
//apollo graphql client
implementation "com.apollographql.apollo3:apollo-runtime:$apollo_version"
//network util
implementation "com.github.haroldadmin:NetworkResponseAdapter:$reponse_version"
//moshi
Expand Down Expand Up @@ -98,14 +106,20 @@ dependencies {
//testing
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leak_version"
testImplementation "junit:junit:$junit_version"
testImplementation "androidx.test:core-ktx:$core_text_ktx_version"
testImplementation "org.robolectric:robolectric:$robolectric_version"
androidTestImplementation "androidx.test.ext:junit:$junit_ext_version"
androidTestImplementation "androidx.test.espresso:espresso-core:$expresso_version"
}

apollo {
generateKotlinModels.set(true)
packageName.set("com.sharkaboi.mediahub")
srcDir("src/main/graphql")
}

ktlint {
disabledRules.set(["no-wildcard-imports"])
disabledRules.set([
"no-wildcard-imports",
"final-newline"
])
}
4 changes: 1 addition & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:resizeableActivity="false"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MediaHub"
Expand All @@ -36,7 +35,7 @@
android:exported="true"
android:launchMode="singleTop"
android:screenOrientation="sensorPortrait"
android:theme="@style/Theme.MediaHub"
android:theme="@style/Theme.MediaHub.Auth"
tools:ignore="LockedOrientationActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
Expand All @@ -53,7 +52,6 @@
android:name=".modules.main.ui.MainActivity"
android:exported="true"
android:launchMode="singleInstance"
android:screenOrientation="sensorPortrait"
android:theme="@style/Theme.MediaHub"
android:windowSoftInputMode="adjustPan"
tools:ignore="LockedOrientationActivity">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
query GetNextAiringAnimeEpisode(
$idMal: Int!
) {
Media(idMal: $idMal, type: ANIME) {
returnedMedia : Media(idMal: $idMal, type: ANIME) {
nextAiringEpisode {
episode
timeUntilAiring
Expand Down
Loading

0 comments on commit f79d36f

Please sign in to comment.