-
-
Notifications
You must be signed in to change notification settings - Fork 793
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d5007f0
Showing
69 changed files
with
2,002 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
import org.jetbrains.compose.compose | ||
|
||
plugins { | ||
id("org.jetbrains.compose") | ||
id("com.android.application") | ||
kotlin("android") | ||
} | ||
|
||
group = "com.shabinder" | ||
version = Versions.versionName | ||
|
||
repositories { | ||
google() | ||
} | ||
|
||
android { | ||
compileSdkVersion(29) | ||
defaultConfig { | ||
applicationId = "com.shabinder.android" | ||
minSdkVersion(Versions.minSdkVersion) | ||
targetSdkVersion(Versions.targetSdkVersion) | ||
versionCode = Versions.versionCode | ||
versionName = Versions.versionName | ||
} | ||
buildTypes { | ||
getByName("release") { | ||
isMinifyEnabled = false | ||
//isShrinkResources = true | ||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") | ||
} | ||
} | ||
compileOptions { | ||
// Flag to enable support for the new language APIs | ||
//coreLibraryDesugaringEnabled = true | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
configurations { | ||
"implementation" { | ||
exclude(group = "androidx.compose.animation") | ||
exclude(group = "androidx.compose.foundation") | ||
exclude(group = "androidx.compose.material") | ||
exclude(group = "androidx.compose.runtime") | ||
exclude(group = "androidx.compose.ui") | ||
} | ||
} | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
useIR = true | ||
} | ||
} | ||
dependencies { | ||
implementation(compose.material) | ||
implementation(project(":common:database")) | ||
implementation(project(":common:compose-ui")) | ||
implementation(project(":common:dependency-injection")) | ||
implementation(project(":common:data-models")) | ||
implementation(Androidx.appCompat) | ||
implementation(Androidx.coroutines) | ||
implementation(Androidx.core) | ||
implementation(Androidx.palette) | ||
//implementation(JetBrains.Compose.materialIcon) | ||
|
||
//Compose-Navigation | ||
implementation(Androidx.composeNavigation) | ||
|
||
//Lifecycle | ||
Versions.androidLifecycle.let{ | ||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:$it") | ||
implementation("androidx.lifecycle:lifecycle-livedata-ktx:$it") | ||
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:$it") | ||
implementation("androidx.lifecycle:lifecycle-viewmodel-savedstate:$it") | ||
} | ||
|
||
//Coil-Image Loading | ||
Versions.coilVersion.let{ | ||
implementation("dev.chrisbanes.accompanist:accompanist-coil:$it") | ||
implementation("dev.chrisbanes.accompanist:accompanist-insets:$it") | ||
} | ||
|
||
Extras.Android.apply { | ||
implementation(appUpdator) | ||
implementation(razorpay) | ||
implementation(fetch) | ||
} | ||
|
||
//Test | ||
testImplementation("junit:junit:4.13.1") | ||
androidTestImplementation(Androidx.junit) | ||
androidTestImplementation(Androidx.expresso) | ||
|
||
//Desugaring | ||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.1") | ||
} | ||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { | ||
kotlinOptions { | ||
jvmTarget = JavaVersion.VERSION_1_8.toString() | ||
freeCompilerArgs = listOf("-Xallow-jvm-ir-dependencies", "-Xskip-prerelease-check", | ||
"-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi" | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.shabinder.android"> | ||
<uses-permission android:name="android.permission.INTERNET"/> | ||
<application | ||
android:allowBackup="false" | ||
android:supportsRtl="true" | ||
android:usesCleartextTraffic="true" | ||
android:theme="@style/Theme.AppCompat.Light.NoActionBar"> | ||
<activity android:name=".MainActivity"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN"/> | ||
<category android:name="android.intent.category.LAUNCHER"/> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
</manifest> |
25 changes: 25 additions & 0 deletions
25
android/src/main/java/com/shabinder/android/MainActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.shabinder.android | ||
|
||
import android.os.Bundle | ||
import android.util.Log | ||
import androidx.appcompat.app.AppCompatActivity | ||
import androidx.compose.runtime.rememberCoroutineScope | ||
import androidx.compose.ui.platform.setContent | ||
import com.shabinder.common.authenticateSpotify | ||
import com.shabinder.common.ui.SpotiFlyerMain | ||
import kotlinx.coroutines.Dispatchers | ||
import kotlinx.coroutines.launch | ||
|
||
class MainActivity : AppCompatActivity() { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContent { | ||
val scope = rememberCoroutineScope() | ||
SpotiFlyerMain() | ||
scope.launch(Dispatchers.IO) { | ||
val token = authenticateSpotify() | ||
Log.i("Spotify",token.toString()) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
google() | ||
jcenter() | ||
mavenCentral() | ||
maven(url = "https://jitpack.io") | ||
maven(url = "https://maven.pkg.jetbrains.space/public/p/compose/dev") | ||
} | ||
} | ||
buildscript { | ||
dependencies { | ||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
`kotlin-dsl-precompiled-script-plugins` | ||
} | ||
|
||
group = "com.shabinder" | ||
version = "2.1" | ||
|
||
buildscript{ | ||
repositories { | ||
// TODO: remove after new build is published | ||
mavenLocal() | ||
google() | ||
jcenter() | ||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") | ||
} | ||
|
||
dependencies { | ||
classpath("com.android.tools.build:gradle:4.0.2") | ||
classpath(JetBrains.Compose.gradlePlugin) | ||
classpath(JetBrains.Kotlin.gradlePlugin) | ||
} | ||
} | ||
|
||
repositories { | ||
jcenter() | ||
mavenLocal() | ||
google() | ||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") | ||
} | ||
|
||
dependencies { | ||
implementation("com.android.tools.build:gradle:4.0.2") | ||
implementation(JetBrains.Compose.gradlePlugin) | ||
implementation(JetBrains.Kotlin.gradlePlugin) | ||
implementation(JetBrains.Kotlin.serialization) | ||
implementation(SqlDelight.gradlePlugin) | ||
} | ||
|
||
kotlinDslPluginOptions { | ||
experimentalWarning.set(false) | ||
} | ||
kotlin { | ||
// Add Deps to compilation, so it will become available in main project | ||
sourceSets.getByName("main").kotlin.srcDir("buildSrc/src/main/kotlin") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
jcenter() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
object Deps { | ||
object ArkIvanov { | ||
object MVIKotlin { | ||
private const val VERSION = "2.0.0" | ||
const val rx = "com.arkivanov.mvikotlin:rx:$VERSION" | ||
const val mvikotlin = "com.arkivanov.mvikotlin:mvikotlin:$VERSION" | ||
const val mvikotlinMain = "com.arkivanov.mvikotlin:mvikotlin-main:$VERSION" | ||
const val mvikotlinMainIosX64 = "com.arkivanov.mvikotlin:mvikotlin-main-iosx64:$VERSION" | ||
const val mvikotlinMainIosArm64 = "com.arkivanov.mvikotlin:mvikotlin-main-iosarm64:$VERSION" | ||
const val mvikotlinLogging = "com.arkivanov.mvikotlin:mvikotlin-logging:$VERSION" | ||
const val mvikotlinTimeTravel = "com.arkivanov.mvikotlin:mvikotlin-timetravel:$VERSION" | ||
const val mvikotlinExtensionsReaktive = "com.arkivanov.mvikotlin:mvikotlin-extensions-reaktive:$VERSION" | ||
} | ||
|
||
object Decompose { | ||
private const val VERSION = "0.1.6" | ||
const val decompose = "com.arkivanov.decompose:decompose:$VERSION" | ||
const val decomposeIosX64 = "com.arkivanov.decompose:decompose-iosx64:$VERSION" | ||
const val decomposeIosArm64 = "com.arkivanov.decompose:decompose-iosarm64:$VERSION" | ||
const val extensionsCompose = "com.arkivanov.decompose:extensions-compose-jetbrains:$VERSION" | ||
} | ||
} | ||
|
||
object Badoo { | ||
object Reaktive { | ||
private const val VERSION = "1.1.19" | ||
const val reaktive = "com.badoo.reaktive:reaktive:$VERSION" | ||
const val reaktiveTesting = "com.badoo.reaktive:reaktive-testing:$VERSION" | ||
const val utils = "com.badoo.reaktive:utils:$VERSION" | ||
const val coroutinesInterop = "com.badoo.reaktive:coroutines-interop:$VERSION" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
@file:Suppress("MayBeConstant", "SpellCheckingInspection") | ||
|
||
object Versions { | ||
const val versionName = "2.2" | ||
const val kotlinVersion = "1.4.21" | ||
|
||
const val coroutinesVersion = "1.4.2" | ||
const val composeVersion = "1.0.0-alpha10" | ||
const val coilVersion = "0.4.1" | ||
//DI | ||
const val kodein = "7.2.0" | ||
|
||
//Internet | ||
const val ktor = "1.5.0" | ||
|
||
const val kotlinxSerialization = "1.0.1" | ||
//Database | ||
const val sqlDelight = "1.4.4" | ||
|
||
const val sqliteJdbcDriver = "3.30.1" | ||
const val slf4j = "1.7.30" | ||
|
||
//Android | ||
const val versionCode = 15 | ||
const val minSdkVersion = 24 | ||
const val compileSdkVersion = 30 | ||
const val targetSdkVersion = 29 | ||
const val androidLifecycle = "2.3.0-rc01" | ||
} | ||
|
||
object Androidx{ | ||
const val appCompat = "androidx.appcompat:appcompat:1.2.0" | ||
const val core = "androidx.core:core-ktx:1.5.0-beta01" | ||
const val palette = "androidx.palette:palette-ktx:1.0.0" | ||
const val composeNavigation = "androidx.navigation:navigation-compose:1.0.0-alpha05" | ||
const val coroutines = "org.jetbrains.kotlinx:kotlinx-coroutines-android:${Versions.coroutinesVersion}" | ||
|
||
const val junit = "androidx.test.ext:junit:1.1.2" | ||
const val expresso = "androidx.test.espresso:espresso-core:3.3.0" | ||
} | ||
object JetBrains { | ||
object Kotlin { | ||
const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlinVersion}" | ||
const val serialization = "org.jetbrains.kotlin:kotlin-serialization:${Versions.kotlinVersion}" | ||
const val testCommon = "org.jetbrains.kotlin:kotlin-test-common:${Versions.kotlinVersion}" | ||
const val testJunit = "org.jetbrains.kotlin:kotlin-test-junit:${Versions.kotlinVersion}" | ||
const val testAnnotationsCommon = "org.jetbrains.kotlin:kotlin-test-annotations-common:${Versions.kotlinVersion}" | ||
} | ||
|
||
object Compose { | ||
// __LATEST_COMPOSE_RELEASE_VERSION__ | ||
private const val VERSION = "0.3.0-build140" | ||
const val gradlePlugin = "org.jetbrains.compose:compose-gradle-plugin:$VERSION" | ||
const val materialIcon = "androidx.compose.material:material-icons-extended:${Versions.composeVersion}" | ||
} | ||
} | ||
object Ktor { | ||
val clientCore = "io.ktor:ktor-client-core:${Versions.ktor}" | ||
val clientJson = "io.ktor:ktor-client-json:${Versions.ktor}" | ||
val clientLogging = "io.ktor:ktor-client-logging:${Versions.ktor}" | ||
val clientSerialization = "io.ktor:ktor-client-serialization:${Versions.ktor}" | ||
|
||
val auth = "io.ktor:ktor-client-auth:${Versions.ktor}" | ||
val clientAndroid = "io.ktor:ktor-client-android:${Versions.ktor}" | ||
val clientDesktop = "io.ktor:ktor-client-curl:${Versions.ktor}" | ||
val clientApache = "io.ktor:ktor-client-apache:${Versions.ktor}" | ||
val slf4j = "org.slf4j:slf4j-simple:${Versions.slf4j}" | ||
val clientIos = "io.ktor:ktor-client-ios:${Versions.ktor}" | ||
val clientCio = "io.ktor:ktor-client-cio:${Versions.ktor}" | ||
val clientJs = "io.ktor:ktor-client-js:${Versions.ktor}" | ||
} | ||
|
||
object Extras { | ||
val youtubeDownloader = "com.github.sealedtx:java-youtube-downloader:2.4.6" | ||
val fuzzyWuzzy = "me.xdrop:fuzzywuzzy:1.3.1" | ||
val mp3agic = "com.mpatric:mp3agic:0.9.1" | ||
val jsonKlaxon = "com.beust:klaxon:5.4" | ||
object Android { | ||
val razorpay = "com.razorpay:checkout:1.6.4" | ||
val fetch = "androidx.tonyodev.fetch2:xfetch2:3.1.5" | ||
val appUpdator = "com.github.amitbd1508:AppUpdater:4.1.0" | ||
} | ||
} | ||
|
||
object JetpackDataStore { | ||
val dep = "androidx.datastore:datastore-preferences-core:1.0.0-alpha05" | ||
} | ||
|
||
object Serialization { | ||
val core = "org.jetbrains.kotlinx:kotlinx-serialization-core:${Versions.kotlinxSerialization}" | ||
} | ||
|
||
object SqlDelight { | ||
val runtime = "com.squareup.sqldelight:runtime:${Versions.sqlDelight}" | ||
val coroutineExtensions = "com.squareup.sqldelight:coroutines-extensions:${Versions.sqlDelight}" | ||
|
||
const val gradlePlugin = "com.squareup.sqldelight:gradle-plugin:${Versions.sqlDelight}" | ||
const val androidDriver = "com.squareup.sqldelight:android-driver:${Versions.sqlDelight}" | ||
const val sqliteDriver = "com.squareup.sqldelight:sqlite-driver:${Versions.sqlDelight}" | ||
const val nativeDriver = "com.squareup.sqldelight:native-driver:${Versions.sqlDelight}" | ||
val nativeDriverMacos = "com.squareup.sqldelight:native-driver-macosx64:${Versions.sqlDelight}" | ||
val jdbcDriver = "org.xerial:sqlite-jdbc:${Versions.sqliteJdbcDriver}" | ||
} |
Oops, something went wrong.