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

V1.3 #32

Merged
merged 10 commits into from
Aug 13, 2021
Merged

V1.3 #32

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
99 changes: 90 additions & 9 deletions .github/workflows/android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,102 @@ name: Android CI
on: [ push, pull_request ]

jobs:
test:
name: Run Unit Tests
build:
name: Gradle Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Checkout repo
uses: actions/checkout@v1

- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}

- name: set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v2
with:
java-version: 11
java-version: '11'
distribution: 'adopt'

- name: Setup Gradle
run: chmod +x gradlew

- name: Gradle build
run: bash ./gradlew build
run: bash ./gradlew assembleDebug

test:
name: Run Tests and lint checks
runs-on: macos-latest
timeout-minutes: 60
needs: build
strategy:
matrix:
api-level: [23, 26, 28]

steps:
- name: Checkout repo
uses: actions/checkout@v2

- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}

- uses: actions/cache@v2
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ matrix.api-level }}-default

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'

- name: Setup Gradle
run: chmod +x gradlew

- name: Run kltlint
run: ./gradlew ktlintCheck

- name: Unit tests
run: bash ./gradlew test --stacktrace
- name: kltlint check
run: bash ./gradlew ktlintCheck
run: ./gradlew test --stacktrace

- name: Create AVD snapshot
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: default
disable-animations: false
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
script: echo "Generated AVD snapshot."

- name: Instrumentation Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: x86
target: default
disable-animations: true
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -no-snapshot-save
emulator-build: 7425822 # https://github.com/ReactiveCircus/android-emulator-runner/issues/160
script: ./gradlew connectedCheck --stacktrace

- name: Upload Reports
uses: actions/upload-artifact@v2
with:
name: Test-Reports
path: app/build/reports
if: always()
36 changes: 27 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<b><h1 align="center">MediaHub</h1></b>
</p>
<p align="center">
<a href="https://github.com/JetBrains/kotlin/releases/tag/v1.5.21" alt="Kotlin">
<img alt="Kotlin" src="https://img.shields.io/badge/Kotlin-1.5.21-blue" />
<a href="https://github.com/JetBrains/kotlin/releases" alt="Kotlin">
<img alt="Kotlin" src="https://img.shields.io/github/v/release/Jetbrains/kotlin" />
</a>
<a href="https://github.com/Sharkaboi/MediaHub/blob/master/LICENSE" alt="License">
<img alt="License" src="https://img.shields.io/badge/License-MIT-orange" />
Expand All @@ -25,6 +25,7 @@
</p>

## Uses

* [Kotlin](https://kotlinlang.org/)
* MVI/MVVM Architecture
* [Retrofit](https://square.github.io/retrofit/)
Expand All @@ -50,9 +51,11 @@
* [OSS licenses plugin](https://developers.google.com/android/guides/opensource)

## Releases

* Check out the latest releases [here](https://github.com/Sharkaboi/MediaHub/releases)

## Screenshots

Anime | Manga
:-------------------------:|:-------------------------:
![](assets/screenshots/anime.png) | ![](assets/screenshots/manga.png)
Expand All @@ -74,30 +77,45 @@ Settings | Update
![](assets/screenshots/settings.png) | ![](assets/screenshots/update.png)

## Build instructions

* Install Gradle and Kotlin.
* Clone project.
* Register your app with MyAnimeList as show [here](https://myanimelist.net/blog.php?eid=835707)
* In the project root, add `clientId=<CLIENT ID>` to the `secrets.properties` file. Create if not found.
* Open in Android studio or Intellij and build and sync project (Be sure the generated classes of Hilt, ViewBinding and Apollo are generated).
* In the project root, add `clientId=<CLIENT ID>` to the `secrets.properties` file. Create if not
found.
* Open in Android studio or Intellij and build and sync project (Be sure the generated classes of
Hilt, ViewBinding and Apollo are generated).
* Run on any device and perform OAuth login to give access to your account.

## Credits

* [Photo by Audrey Mari from Pexels](https://www.pexels.com/photo/photo-of-japanese-lanterns-3421920/)
* [Tabler icons by Paweł Kuna](https://tablericons.com/)
* [Bubbles icons by Umar Irshad](https://www.iconfinder.com/iconsets/48-bubbles)

## Contributing

PR's are welcome. Please try to follow the template.

## Privacy, Security and other info
* App only acts as intermediate to MyAnimeList and AniList and does not have it's own server or store any data.

* App only acts as intermediate to MyAnimeList and AniList and does not have it's own server or
store any data.
* App only has network permissions, the `WRITE_EXTERNAL_STORAGE`,
`READ_EXTERNAL_STORAGE` & `FOREGROUND_SERVICE` in the merged manifest is from [LeakCanary](https://square.github.io/leakcanary/) which is not included in the release builds.
* App stores the token using [Datastore](https://developer.android.com/topic/libraries/architecture/datastore), which doesn't have an encryption library yet.
This implies anyone with debugging access or root access to your phone can get the your OAuth token. Please keep this in mind.
* The app doesn't fetch "live data" and only shows the snapshot of data of when it was fetched. Please refresh to see any changes made through the MyAnimeList website or other clients.
`READ_EXTERNAL_STORAGE` & `FOREGROUND_SERVICE` in the merged manifest is
from [LeakCanary](https://square.github.io/leakcanary/) which is not included in the release
builds.
* App stores the token
using [Datastore](https://developer.android.com/topic/libraries/architecture/datastore), which
is not encrypted. This implies anyone with debugging access or root access
to your phone can get the your OAuth token if needed. Please keep this in mind.
* The app doesn't fetch "live data" and only shows the snapshot of data of when it was fetched.
Please refresh to see any changes made through the MyAnimeList website or other clients.
* The app queries all browsers in the device to handle unsupported MyAnimeList deeplinks. This is
done as the API does not still support all the features provided in the web interface.

## Licence

```
MIT License

Expand Down
12 changes: 6 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ plugins {
}

android {
compileSdkVersion 30
compileSdkVersion 31

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

multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -34,11 +34,11 @@ android {
}
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '11'
}

buildFeatures {
Expand Down
Loading