Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ichvandi-maulana committed Jul 11, 2022
0 parents commit 991a63f
Show file tree
Hide file tree
Showing 97 changed files with 3,279 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*.iml
.gradle
/local.properties
.idea
.DS_Store
build
/captures
.externalNativeBuild
.cxx
local.properties
/app/release
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
166 changes: 166 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
id 'androidx.navigation.safeargs.kotlin'
id 'com.google.gms.google-services'
id 'kotlin-parcelize'
id 'com.google.devtools.ksp'
}

android {
compileSdk 32

defaultConfig {
applicationId "com.vandoc.iptv"
minSdk 21
targetSdk 32
versionCode 1
versionName "1.0"

buildConfigField "String", "BASE_URL", '"https://ai-iptv.herokuapp.com/"'

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.debug
}

buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

// Other Parameters
debuggable false
jniDebuggable false
renderscriptDebuggable false
pseudoLocalesEnabled false
zipAlignEnabled true
// signingConfig signingConfigs.release
}
}

applicationVariants.all { variant ->
kotlin.sourceSets {
getByName(variant.name) {
kotlin.srcDir("build/generated/ksp/${variant.name}/kotlin")
}
}
}

buildFeatures {
viewBinding true
compose = true
}

composeOptions {
kotlinCompilerExtensionVersion = compose_version
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '1.8'
}

packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}

dependencies {
// Coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.2"

// Lifecycle
def lifecycleVersion = "2.4.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-service:$lifecycleVersion"

// Compose
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.material3:material3:1.0.0-alpha13"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
implementation "androidx.compose.material:material-icons-extended:$compose_version"
implementation 'androidx.activity:activity-compose:1.5.0-rc01'
implementation "androidx.compose.ui:ui-viewbinding:$compose_version"
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"

// Compose Navigation
implementation 'io.github.raamcosta.compose-destinations:core:1.6.12-beta'
ksp 'io.github.raamcosta.compose-destinations:ksp:1.6.12-beta'

// Compose Image Loader
implementation "com.github.skydoves:landscapist-coil:1.5.2"

// Compose DI
implementation 'androidx.hilt:hilt-navigation-compose:1.0.0'

// Dependency Injection
implementation 'com.google.dagger:hilt-android:2.42'
kapt 'com.google.dagger:hilt-compiler:2.42'

// Networking
implementation "com.squareup.retrofit2:retrofit:2.9.0"
implementation "com.squareup.retrofit2:converter-gson:2.9.0"

// Activity / Fragment
implementation "androidx.fragment:fragment-ktx:1.4.1"
implementation "androidx.activity:activity-ktx:1.4.0"

// Navigation
implementation "androidx.navigation:navigation-runtime-ktx:2.4.2"
implementation "androidx.navigation:navigation-fragment-ktx:2.4.2"
implementation "androidx.navigation:navigation-ui-ktx:2.4.2"

// Logging
implementation 'com.jakewharton.timber:timber:5.0.1'

// RecyclerView
def epoxyVersion = "5.0.0-beta05"
implementation "com.airbnb.android:epoxy:$epoxyVersion"
kapt "com.airbnb.android:epoxy-processor:$epoxyVersion"

// Coil
implementation "io.coil-kt:coil:2.1.0"

// ViewBinding Delegate
implementation "com.github.hoc081098:ViewBindingDelegate:1.3.1"

// Exoplayer
implementation 'com.google.android.exoplayer:exoplayer-core:2.18.0'
implementation 'com.google.android.exoplayer:exoplayer-hls:2.18.0'
implementation 'com.google.android.exoplayer:exoplayer-dash:2.18.0'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.18.0'
implementation "com.google.android.exoplayer:extension-okhttp:2.18.0"

// OkHttp
implementation "com.squareup.okhttp3:okhttp:4.10.0"
implementation "com.squareup.okhttp3:okhttp-dnsoverhttps:4.10.0"

// Chucker
debugImplementation "com.github.chuckerteam.chucker:library:3.5.2"
releaseImplementation "com.github.chuckerteam.chucker:library-no-op:3.5.2"

// Remote Config
implementation 'com.google.firebase:firebase-config-ktx:21.1.0'

// LeakCanary
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1'

implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.6.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
39 changes: 39 additions & 0 deletions app/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"project_info": {
"project_number": "383363061259",
"project_id": "iptv-ab548",
"storage_bucket": "iptv-ab548.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:383363061259:android:cbeec3a334932e56e2d90e",
"android_client_info": {
"package_name": "com.vandoc.iptv"
}
},
"oauth_client": [
{
"client_id": "383363061259-i6c5p8emb2il8t27dnis8el4iekh1efq.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCZpnsDCxVCRVrBmz4lp_UJ6-rXQE_lKmg"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "383363061259-i6c5p8emb2il8t27dnis8el4iekh1efq.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
26 changes: 26 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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

# Prevent R8 from leaving Data object members always null
-keepclassmembers,allowobfuscation class * {
@com.google.gson.annotations.SerializedName <fields>;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.vandoc.iptv

import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith

/**
* 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.vandoc.iptv", appContext.packageName)
}
}
33 changes: 33 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.vandoc.iptv">

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />

<application
android:name=".MyApp"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Iptv"
android:usesCleartextTraffic="true"
tools:targetApi="31">
<activity
android:name=".ui.main.MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

</application>

</manifest>
21 changes: 21 additions & 0 deletions app/src/main/java/com/vandoc/iptv/MyApp.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.vandoc.iptv

import android.app.Application
import dagger.hilt.android.HiltAndroidApp
import timber.log.Timber

/**
* @author Ichvandi
* Created on 06/06/2022 at 20:58.
*/
@HiltAndroidApp
class MyApp : Application() {

override fun onCreate() {
super.onCreate()
if (BuildConfig.DEBUG) {
Timber.plant(Timber.DebugTree())
}
}

}
18 changes: 18 additions & 0 deletions app/src/main/java/com/vandoc/iptv/base/AppDispatcher.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.vandoc.iptv.base

import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.Dispatchers
import javax.inject.Inject
import javax.inject.Singleton

@Singleton
class AppDispatcher @Inject constructor() : DispatcherProvider {
override val main: CoroutineDispatcher
get() = Dispatchers.Main
override val io: CoroutineDispatcher
get() = Dispatchers.IO
override val default: CoroutineDispatcher
get() = Dispatchers.Default
override val unconfined: CoroutineDispatcher
get() = Dispatchers.Unconfined
}
Loading

0 comments on commit 991a63f

Please sign in to comment.