Skip to content

Commit

Permalink
AnimeSources now different module
Browse files Browse the repository at this point in the history
  • Loading branch information
fakeyatogod committed Oct 26, 2023
1 parent 821b8fb commit 45a1ec9
Show file tree
Hide file tree
Showing 23 changed files with 131 additions and 3 deletions.
1 change: 1 addition & 0 deletions .idea/gradle.xml

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

1 change: 1 addition & 0 deletions animeSources/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
49 changes: 49 additions & 0 deletions animeSources/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
}

android {
namespace 'com.talent.animescrap_animesources'
compileSdk 34

defaultConfig {
minSdk 23

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

dependencies {

implementation project(path: ':AnimeScrapCommon')


implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.10.0'

// Network
implementation 'org.jsoup:jsoup:1.15.2' // Web scraping tool
implementation 'com.google.code.gson:gson:2.9.0' // Json Parser
implementation 'com.squareup.okhttp3:okhttp:4.10.0'

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
Empty file added animeSources/consumer-rules.pro
Empty file.
21 changes: 21 additions & 0 deletions animeSources/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.talent.animescrap_animesources

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.talent.animescrap_animesources.test", appContext.packageName)
}
}
4 changes: 4 additions & 0 deletions animeSources/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.talent.animescrap_animesources

import org.junit.Test

import org.junit.Assert.*

/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ dependencies {
implementation 'com.google.android.material:material:1.10.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation project(path: ':AnimeScrapCommon')
implementation project(path: ':animeSources')

// ExoPlayer + HLS + UI + MediaSession
def exo_version = "2.19.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,21 @@ import android.content.Context
import android.util.Log
import androidx.preference.PreferenceManager
import com.talent.animescrap.R
import com.talent.animescrap.animesources.*
import com.talent.animescrap.animesources.AllAnimeSource
import com.talent.animescrap.animesources.AnimePaheSource
import com.talent.animescrap.animesources.AnimeSource
import com.talent.animescrap.animesources.AsianLoad
import com.talent.animescrap.animesources.EnimeSource
import com.talent.animescrap.animesources.KawaiifuSource
import com.talent.animescrap.animesources.KissKhSource
import com.talent.animescrap.animesources.MarinMoeSource
import com.talent.animescrap.animesources.MyAsianTvSource
import com.talent.animescrap.animesources.YugenSource
import com.talent.animescrap.room.FavRoomModel
import com.talent.animescrap.room.LinkDao
import com.talent.animescrap_common.model.AnimeDetails
import com.talent.animescrap_common.model.AnimeStreamLink
import com.talent.animescrap_common.model.SimpleAnime
import com.talent.animescrap.room.FavRoomModel
import com.talent.animescrap.room.LinkDao
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.map
Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ dependencyResolutionManagement {
rootProject.name = "Anime Scrap"
include ':app'
include ':AnimeScrapCommon'
include ':animeSources'

0 comments on commit 45a1ec9

Please sign in to comment.