mirror of
https://github.com/YTVanced/VancedManager
synced 2024-11-22 03:05:11 +00:00
switched to kotlin dsl
This commit is contained in:
parent
e7c10d01e8
commit
efca4f7434
20 changed files with 463 additions and 455 deletions
157
app/build.gradle
157
app/build.gradle
|
@ -1,157 +0,0 @@
|
||||||
import java.util.regex.Matcher
|
|
||||||
import java.util.regex.Pattern
|
|
||||||
|
|
||||||
apply plugin: 'com.android.application'
|
|
||||||
apply plugin: 'kotlin-android'
|
|
||||||
apply plugin: 'kotlin-android-extensions'
|
|
||||||
apply plugin: 'kotlin-kapt'
|
|
||||||
apply plugin: 'com.google.gms.google-services'
|
|
||||||
apply plugin: 'com.google.firebase.firebase-perf'
|
|
||||||
apply plugin: 'com.google.firebase.crashlytics'
|
|
||||||
apply plugin: 'androidx.navigation.safeargs.kotlin'
|
|
||||||
|
|
||||||
android {
|
|
||||||
compileSdkVersion 30
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
applicationId "com.vanced.manager"
|
|
||||||
minSdkVersion 21
|
|
||||||
targetSdkVersion 30
|
|
||||||
versionCode 210
|
|
||||||
versionName "2.1.0 (CyberManager2077)"
|
|
||||||
|
|
||||||
vectorDrawables.useSupportLibrary true
|
|
||||||
|
|
||||||
buildConfigField "String[]", "MANAGER_LANGUAGES", "{" + surroundWithQuotes(getLanguages()) + "}"
|
|
||||||
buildConfigField "Boolean", "ENABLE_CROWDIN_AUTH", "false"
|
|
||||||
buildConfigField "String", "CROWDIN_HASH", "\"${System.getenv('CROWDIN_HASH')}\""
|
|
||||||
buildConfigField "String", "CROWDIN_CLIENT_ID", "\"${System.getenv('CROWDIN_CLIENT_ID')}\""
|
|
||||||
buildConfigField "String", "CROWDIN_CLIENT_SECRET", "\"${System.getenv('CROWDIN_CLIENT_SECRET')}\""
|
|
||||||
}
|
|
||||||
|
|
||||||
lintOptions {
|
|
||||||
disable 'MissingTranslation', 'ExtraTranslation'
|
|
||||||
}
|
|
||||||
|
|
||||||
applicationVariants.all { variant ->
|
|
||||||
resValue "string", "versionName", versionName
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
|
||||||
release {
|
|
||||||
minifyEnabled true
|
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
buildFeatures {
|
|
||||||
dataBinding true // ObservableField migrate to flow or liveData
|
|
||||||
viewBinding true
|
|
||||||
}
|
|
||||||
|
|
||||||
packagingOptions {
|
|
||||||
exclude 'META-INF/DEPENDENCIES'
|
|
||||||
exclude "META-INF/*.kotlin_module"
|
|
||||||
}
|
|
||||||
|
|
||||||
// To inline the bytecode built with JVM target 1.8 into
|
|
||||||
// bytecode that is being built with JVM target 1.6. (e.g. navArgs)
|
|
||||||
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
|
||||||
}
|
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = "1.8"
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def getLanguages() {
|
|
||||||
List<String> langs = new ArrayList<String>()
|
|
||||||
langs.add("en")
|
|
||||||
//Add languages with dialects
|
|
||||||
langs.add("bn_BD")
|
|
||||||
langs.add("bn_IN")
|
|
||||||
langs.add("pt_BR")
|
|
||||||
langs.add("pt_PT")
|
|
||||||
langs.add("zh_CN")
|
|
||||||
langs.add("zh_TW")
|
|
||||||
List<String> exceptions = ["bn", "pt", "zh"]
|
|
||||||
Pattern pattern = Pattern.compile("-(\\w+)-")
|
|
||||||
new File("${projectDir}/src/main/res").eachDir { dir ->
|
|
||||||
if (dir.name.startsWith("values-") && !dir.name.contains("v23")) {
|
|
||||||
Matcher matcher = pattern.matcher(dir.name)
|
|
||||||
if (matcher.find() && !exceptions.any { matcher.group(1) == it } ) {
|
|
||||||
langs.add(matcher.group(1))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return langs.toArray().toSorted()
|
|
||||||
}
|
|
||||||
|
|
||||||
static def surroundWithQuotes(Object[] arr) {
|
|
||||||
String[] dummyArr = arr
|
|
||||||
for (int i = 0; i < arr.length; i++) {
|
|
||||||
dummyArr[i] = "\"" + arr[i] + "\""
|
|
||||||
}
|
|
||||||
return dummyArr.join(", ")
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
|
|
||||||
implementation project(':core-presentation')
|
|
||||||
implementation project(":core-ui")
|
|
||||||
|
|
||||||
implementation project(':library-network')
|
|
||||||
// Kotlin
|
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
||||||
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
|
||||||
|
|
||||||
// AndroidX
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
|
||||||
implementation 'androidx.browser:browser:1.3.0'
|
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
|
||||||
implementation 'androidx.core:core-ktx:1.3.2'
|
|
||||||
implementation 'androidx.fragment:fragment-ktx:1.2.5'
|
|
||||||
implementation 'androidx.lifecycle:lifecycle-livedata-core-ktx:2.2.0'
|
|
||||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
|
|
||||||
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
|
|
||||||
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.2'
|
|
||||||
implementation 'androidx.navigation:navigation-ui-ktx:2.3.2'
|
|
||||||
implementation 'androidx.preference:preference-ktx:1.1.1'
|
|
||||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
|
||||||
|
|
||||||
|
|
||||||
//Appearance
|
|
||||||
implementation 'com.github.madrapps:pikolo:2.0.1'
|
|
||||||
implementation 'com.google.android.material:material:1.3.0-beta01'
|
|
||||||
|
|
||||||
// JSON parser
|
|
||||||
implementation 'com.beust:klaxon:5.4'
|
|
||||||
|
|
||||||
// Crowdin
|
|
||||||
implementation 'com.crowdin.platform:mobile-sdk:1.2.0'
|
|
||||||
|
|
||||||
// Tips
|
|
||||||
implementation 'com.github.florent37:viewtooltip:1.2.2'
|
|
||||||
|
|
||||||
// HTTP networking
|
|
||||||
implementation 'com.github.kittinunf.fuel:fuel:2.3.0'
|
|
||||||
implementation 'com.github.kittinunf.fuel:fuel-coroutines:2.2.3'
|
|
||||||
implementation 'com.github.kittinunf.fuel:fuel-json:2.2.3'
|
|
||||||
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0'
|
|
||||||
|
|
||||||
// Root permissions
|
|
||||||
implementation 'com.github.topjohnwu.libsu:core:3.0.2'
|
|
||||||
implementation 'com.github.topjohnwu.libsu:io:3.0.2'
|
|
||||||
|
|
||||||
// Layout
|
|
||||||
implementation 'com.google.android:flexbox:2.0.1'
|
|
||||||
|
|
||||||
// Firebase
|
|
||||||
implementation 'com.google.firebase:firebase-analytics-ktx:18.0.0'
|
|
||||||
implementation 'com.google.firebase:firebase-crashlytics:17.3.0'
|
|
||||||
implementation 'com.google.firebase:firebase-messaging:21.0.1'
|
|
||||||
implementation 'com.google.firebase:firebase-perf:19.0.11'
|
|
||||||
}
|
|
149
app/build.gradle.kts
Normal file
149
app/build.gradle.kts
Normal file
|
@ -0,0 +1,149 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.application")
|
||||||
|
kotlin("android")
|
||||||
|
kotlin("android.extensions") //We still need it for custom views
|
||||||
|
kotlin("kapt")
|
||||||
|
id("com.google.gms.google-services")
|
||||||
|
id("com.google.firebase.crashlytics")
|
||||||
|
id("com.google.firebase.firebase-perf")
|
||||||
|
id("androidx.navigation.safeargs.kotlin")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdkVersion(30)
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
applicationId = "com.vanced.manager"
|
||||||
|
minSdkVersion(21)
|
||||||
|
targetSdkVersion(30)
|
||||||
|
versionCode = 210
|
||||||
|
versionName = "2.1.0 (CyberManager2077)"
|
||||||
|
|
||||||
|
vectorDrawables.useSupportLibrary = true
|
||||||
|
|
||||||
|
buildConfigField("String[]", "MANAGER_LANGUAGES", "{" + getLanguages().surroundWithQuotes() + "}")
|
||||||
|
buildConfigField("Boolean", "ENABLE_CROWDIN_AUTH", "false")
|
||||||
|
buildConfigField("String", "CROWDIN_HASH", "\"${System.getenv("CROWDIN_HASH")}\"")
|
||||||
|
buildConfigField("String", "CROWDIN_CLIENT_ID", "\"${System.getenv("CROWDIN_CLIENT_ID")}\"")
|
||||||
|
buildConfigField("String", "CROWDIN_CLIENT_SECRET", "\"${System.getenv("CROWDIN_CLIENT_SECRET")}\"")
|
||||||
|
}
|
||||||
|
|
||||||
|
lintOptions {
|
||||||
|
disable("MissingTranslation", "ExtraTranslation")
|
||||||
|
}
|
||||||
|
|
||||||
|
applicationVariants.all {
|
||||||
|
resValue("string", "versionName", versionName)
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
getByName("release") {
|
||||||
|
isMinifyEnabled = true
|
||||||
|
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buildFeatures {
|
||||||
|
dataBinding = true // ObservableField migrate to flow or liveData
|
||||||
|
viewBinding = true
|
||||||
|
}
|
||||||
|
|
||||||
|
packagingOptions {
|
||||||
|
exclude("META-INF/DEPENDENCIES")
|
||||||
|
exclude("META-INF/*.kotlin_module")
|
||||||
|
}
|
||||||
|
|
||||||
|
// To inline the bytecode built with JVM target 1.8 into
|
||||||
|
// bytecode that is being built with JVM target 1.6. (e.g. navArgs)
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = "1.8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getLanguages(): Array<String> {
|
||||||
|
val langs = mutableListOf("en", "bn_BD", "bn_IN", "pt_BR", "pt_PT", "zh_CN", "zh_TW")
|
||||||
|
val exceptions = listOf("bn", "pt", "zh")
|
||||||
|
val pattern = "-(\\w+)-".toRegex()
|
||||||
|
|
||||||
|
File("$projectDir/src/main/res").listFiles()?.forEach { dir ->
|
||||||
|
if (dir.name.startsWith("values-") && !dir.name.contains("v23")) {
|
||||||
|
val match = pattern.find(dir.name)
|
||||||
|
if (match != null) {
|
||||||
|
val matchedDir = match.value.removeSurrounding("-")
|
||||||
|
if (!exceptions.any { matchedDir == it }) {
|
||||||
|
langs.add(matchedDir)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return langs.sorted().toTypedArray()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun Array<String>.surroundWithQuotes(): String = this.joinToString(", ") { "\"$this\"" }
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
|
||||||
|
implementation(project(":core-presentation"))
|
||||||
|
implementation(project(":core-ui"))
|
||||||
|
|
||||||
|
implementation(project(":library-network"))
|
||||||
|
|
||||||
|
// Kotlin
|
||||||
|
implementation(kotlin("stdlib-jdk8"))
|
||||||
|
implementation(kotlin("reflect"))
|
||||||
|
|
||||||
|
// AndroidX
|
||||||
|
implementation("androidx.appcompat:appcompat:1.2.0")
|
||||||
|
implementation("androidx.browser:browser:1.3.0")
|
||||||
|
implementation("androidx.constraintlayout:constraintlayout:2.0.4")
|
||||||
|
implementation("androidx.core:core-ktx:1.3.2")
|
||||||
|
implementation("androidx.fragment:fragment-ktx:1.2.5")
|
||||||
|
implementation("androidx.lifecycle:lifecycle-livedata-core-ktx:2.2.0")
|
||||||
|
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0")
|
||||||
|
implementation("androidx.localbroadcastmanager:localbroadcastmanager:1.0.0")
|
||||||
|
implementation("androidx.navigation:navigation-fragment-ktx:2.3.2")
|
||||||
|
implementation("androidx.navigation:navigation-ui-ktx:2.3.2")
|
||||||
|
implementation("androidx.preference:preference-ktx:1.1.1")
|
||||||
|
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
|
||||||
|
|
||||||
|
//Appearance
|
||||||
|
implementation("com.github.madrapps:pikolo:2.0.1")
|
||||||
|
implementation("com.google.android.material:material:1.3.0-beta01")
|
||||||
|
|
||||||
|
// JSON parser
|
||||||
|
implementation("com.beust:klaxon:5.4")
|
||||||
|
|
||||||
|
// Crowdin
|
||||||
|
implementation("com.crowdin.platform:mobile-sdk:1.2.0")
|
||||||
|
|
||||||
|
// Tips
|
||||||
|
implementation("com.github.florent37:viewtooltip:1.2.2")
|
||||||
|
|
||||||
|
// HTTP networking
|
||||||
|
implementation("com.github.kittinunf.fuel:fuel:2.3.0")
|
||||||
|
implementation("com.github.kittinunf.fuel:fuel-coroutines:2.2.3")
|
||||||
|
implementation("com.github.kittinunf.fuel:fuel-json:2.2.3")
|
||||||
|
implementation("com.squareup.okhttp3:logging-interceptor:4.9.0")
|
||||||
|
|
||||||
|
// Root permissions
|
||||||
|
implementation("com.github.topjohnwu.libsu:core:3.0.2")
|
||||||
|
implementation("com.github.topjohnwu.libsu:io:3.0.2")
|
||||||
|
|
||||||
|
// Layout
|
||||||
|
implementation("com.google.android:flexbox:2.0.1")
|
||||||
|
|
||||||
|
// Firebase
|
||||||
|
implementation("com.google.firebase:firebase-analytics-ktx:18.0.0")
|
||||||
|
implementation("com.google.firebase:firebase-crashlytics:17.3.0")
|
||||||
|
implementation("com.google.firebase:firebase-messaging:21.0.1")
|
||||||
|
implementation("com.google.firebase:firebase-perf:19.0.11")
|
||||||
|
}
|
2
app/proguard-rules.pro
vendored
2
app/proguard-rules.pro
vendored
|
@ -1,6 +1,6 @@
|
||||||
# Add project specific ProGuard rules here.
|
# Add project specific ProGuard rules here.
|
||||||
# You can control the set of applied configuration files using the
|
# You can control the set of applied configuration files using the
|
||||||
# proguardFiles setting in build.gradle.
|
# proguardFiles setting in build.gradle.kts.kts.kts.kts.
|
||||||
#
|
#
|
||||||
# For more details, see
|
# For more details, see
|
||||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||||
|
|
36
build.gradle
36
build.gradle
|
@ -1,36 +0,0 @@
|
||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
||||||
|
|
||||||
buildscript {
|
|
||||||
ext.kotlin_version = '1.4.21'
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
jcenter()
|
|
||||||
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath 'com.android.tools.build:gradle:4.1.1'
|
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
||||||
classpath 'com.google.gms:google-services:4.3.4'
|
|
||||||
classpath 'com.google.firebase:perf-plugin:1.3.4'
|
|
||||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1'
|
|
||||||
classpath 'androidx.navigation:navigation-safe-args-gradle-plugin:2.3.2'
|
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
|
||||||
// in the individual module build.gradle files
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
allprojects {
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
jcenter()
|
|
||||||
maven {
|
|
||||||
url "https://jitpack.io"
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task clean(type: Delete) {
|
|
||||||
delete rootProject.buildDir
|
|
||||||
}
|
|
32
build.gradle.kts
Normal file
32
build.gradle.kts
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
classpath("com.android.tools.build:gradle:4.1.1")
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21")
|
||||||
|
classpath("com.google.gms:google-services:4.3.4")
|
||||||
|
classpath("com.google.firebase:perf-plugin:1.3.4")
|
||||||
|
classpath("com.google.firebase:firebase-crashlytics-gradle:2.4.1")
|
||||||
|
classpath("androidx.navigation:navigation-safe-args-gradle-plugin:2.3.2")
|
||||||
|
|
||||||
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
// in the individual module build.gradle.kts files
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
jcenter()
|
||||||
|
maven(url = "https://jitpack.io")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task<Delete>("clean") {
|
||||||
|
delete(rootProject.buildDir)
|
||||||
|
}
|
9
buildSrc/build.gradle.kts
Normal file
9
buildSrc/build.gradle.kts
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
plugins {
|
||||||
|
`kotlin-dsl`
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
jcenter()
|
||||||
|
maven(url = "https://jitpack.io")
|
||||||
|
}
|
5
buildSrc/src/main/java/Config.kt
Normal file
5
buildSrc/src/main/java/Config.kt
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
object Config {
|
||||||
|
|
||||||
|
const val kotlinVersion = "1.4.21"
|
||||||
|
|
||||||
|
}
|
|
@ -1,23 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'org.jetbrains.kotlin.jvm'
|
|
||||||
}
|
|
||||||
|
|
||||||
java {
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
|
||||||
}
|
|
||||||
|
|
||||||
test {
|
|
||||||
useJUnitPlatform()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
||||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1"
|
|
||||||
|
|
||||||
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.1'
|
|
||||||
testImplementation 'io.kotest:kotest-runner-junit5:4.3.1'
|
|
||||||
testImplementation 'io.kotest:kotest-assertions-core:4.3.1'
|
|
||||||
testImplementation 'io.kotest:kotest-property:4.3.1'
|
|
||||||
testImplementation "io.mockk:mockk:1.10.2"
|
|
||||||
}
|
|
19
core-mvi/build.gradle.kts
Normal file
19
core-mvi/build.gradle.kts
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
plugins {
|
||||||
|
kotlin("jvm")
|
||||||
|
}
|
||||||
|
|
||||||
|
java {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(kotlin("stdlib"))
|
||||||
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1")
|
||||||
|
|
||||||
|
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.1")
|
||||||
|
testImplementation("io.kotest:kotest-runner-junit5:4.3.2")
|
||||||
|
testImplementation("io.kotest:kotest-assertions-core:4.3.2")
|
||||||
|
testImplementation("io.kotest:kotest-property:4.3.2")
|
||||||
|
testImplementation("io.mockk:mockk:1.10.4")
|
||||||
|
}
|
|
@ -1,39 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
compileSdkVersion 30
|
|
||||||
buildToolsVersion "30.0.2"
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
minSdkVersion 16
|
|
||||||
targetSdkVersion 30
|
|
||||||
versionCode 1
|
|
||||||
versionName "1.0"
|
|
||||||
|
|
||||||
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 "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
||||||
implementation 'androidx.core:core-ktx:1.3.2'
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
|
||||||
}
|
|
42
core-presentation/build.gradle.kts
Normal file
42
core-presentation/build.gradle.kts
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
kotlin("android")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdkVersion(30)
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
minSdkVersion(16)
|
||||||
|
targetSdkVersion(30)
|
||||||
|
versionCode = 1
|
||||||
|
versionName = "1.0"
|
||||||
|
|
||||||
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
consumerProguardFiles("consumer-rules.pro")
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
getByName("release") {
|
||||||
|
isMinifyEnabled = false
|
||||||
|
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = "1.8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(kotlin("stdlib"))
|
||||||
|
implementation("androidx.core:core-ktx:1.3.2")
|
||||||
|
implementation("androidx.appcompat:appcompat:1.2.0")
|
||||||
|
}
|
|
@ -1,50 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
compileSdkVersion 30
|
|
||||||
buildToolsVersion "30.0.2"
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
minSdkVersion 16
|
|
||||||
targetSdkVersion 30
|
|
||||||
versionCode 1
|
|
||||||
versionName "1.0"
|
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
||||||
consumerProguardFiles "consumer-rules.pro"
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
|
||||||
release {
|
|
||||||
minifyEnabled false
|
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
buildFeatures {
|
|
||||||
viewBinding true
|
|
||||||
}
|
|
||||||
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
|
||||||
}
|
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = '1.8'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
||||||
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
|
||||||
implementation 'androidx.core:core-ktx:1.3.2'
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
|
||||||
implementation 'com.google.android.material:material:1.3.0-alpha03'
|
|
||||||
|
|
||||||
//https://developer.android.com/jetpack/androidx/releases/lifecycle
|
|
||||||
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0'
|
|
||||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
|
|
||||||
}
|
|
52
core-ui/build.gradle.kts
Normal file
52
core-ui/build.gradle.kts
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
kotlin("android")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdkVersion(30)
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
minSdkVersion(16)
|
||||||
|
targetSdkVersion(30)
|
||||||
|
versionCode = 1
|
||||||
|
versionName = "1.0"
|
||||||
|
|
||||||
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
consumerProguardFiles("consumer-rules.pro")
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
getByName("release") {
|
||||||
|
isMinifyEnabled = false
|
||||||
|
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buildFeatures {
|
||||||
|
viewBinding = true
|
||||||
|
}
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = "1.8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(kotlin("stdlib"))
|
||||||
|
implementation(kotlin("reflect"))
|
||||||
|
implementation("androidx.core:core-ktx:1.3.2")
|
||||||
|
implementation("androidx.appcompat:appcompat:1.2.0")
|
||||||
|
implementation("com.google.android.material:material:1.3.0-beta01")
|
||||||
|
|
||||||
|
//https://developer.android.com/jetpack/androidx/releases/lifecycle
|
||||||
|
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.2.0")
|
||||||
|
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0")
|
||||||
|
}
|
|
@ -1,84 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
compileSdkVersion 30
|
|
||||||
buildToolsVersion "30.0.2"
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
minSdkVersion 16
|
|
||||||
targetSdkVersion 30
|
|
||||||
versionCode 1
|
|
||||||
versionName "1.0"
|
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
||||||
consumerProguardFiles "consumer-rules.pro"
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
|
||||||
release {
|
|
||||||
minifyEnabled false
|
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
buildFeatures {
|
|
||||||
viewBinding true
|
|
||||||
}
|
|
||||||
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
|
||||||
}
|
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = '1.8'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
android.testOptions {
|
|
||||||
unitTests.all {
|
|
||||||
useJUnitPlatform()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation project(':core-ui')
|
|
||||||
implementation project(':core-presentation')
|
|
||||||
implementation project(':library-network')
|
|
||||||
|
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
|
||||||
implementation 'androidx.core:core-ktx:1.3.2'
|
|
||||||
implementation 'androidx.fragment:fragment-ktx:1.2.5'
|
|
||||||
implementation 'androidx.lifecycle:lifecycle-livedata-core-ktx:2.2.0'
|
|
||||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
|
|
||||||
implementation 'com.google.android.material:material:1.3.0-alpha03'
|
|
||||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
|
||||||
|
|
||||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
|
||||||
|
|
||||||
implementation"com.squareup.moshi:moshi-kotlin:1.11.0"
|
|
||||||
implementation "com.squareup.moshi:moshi-kotlin-codegen:1.11.0"
|
|
||||||
implementation "com.squareup.moshi:moshi-adapters:1.11.0"
|
|
||||||
|
|
||||||
implementation "com.squareup.okhttp3:logging-interceptor:4.9.0"
|
|
||||||
|
|
||||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1"
|
|
||||||
|
|
||||||
implementation "org.koin:koin-android:2.2.1"
|
|
||||||
implementation "org.koin:koin-android-viewmodel:2.2.1"
|
|
||||||
implementation "org.koin:koin-android-ext:2.2.1"
|
|
||||||
|
|
||||||
testImplementation 'io.kotest:kotest-runner-junit5:4.3.1'
|
|
||||||
testImplementation 'io.kotest:kotest-assertions-core:4.3.1'
|
|
||||||
testImplementation 'io.kotest:kotest-property:4.3.1'
|
|
||||||
testImplementation "io.mockk:mockk:1.10.2"
|
|
||||||
|
|
||||||
androidTestImplementation "io.mockk:mockk-android:1.10.2"
|
|
||||||
androidTestImplementation 'androidx.test:core:1.3.0'
|
|
||||||
androidTestImplementation 'androidx.test:runner:1.3.0'
|
|
||||||
androidTestImplementation 'androidx.test:rules:1.3.0'
|
|
||||||
}
|
|
87
feature-home/build.gradle.kts
Normal file
87
feature-home/build.gradle.kts
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
kotlin("android")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdkVersion(30)
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
minSdkVersion(16)
|
||||||
|
targetSdkVersion(30)
|
||||||
|
versionCode = 1
|
||||||
|
versionName = "1.0"
|
||||||
|
|
||||||
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
consumerProguardFiles("consumer-rules.pro")
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
getByName("release") {
|
||||||
|
isMinifyEnabled = false
|
||||||
|
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buildFeatures {
|
||||||
|
viewBinding = true
|
||||||
|
}
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = "1.8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
android.testOptions {
|
||||||
|
unitTests.all {
|
||||||
|
it.useJUnitPlatform()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":core-ui"))
|
||||||
|
implementation(project(":core-presentation"))
|
||||||
|
implementation(project(":library-network"))
|
||||||
|
|
||||||
|
implementation(kotlin("stdlib"))
|
||||||
|
implementation("androidx.appcompat:appcompat:1.2.0")
|
||||||
|
implementation("androidx.core:core-ktx:1.3.2")
|
||||||
|
implementation("androidx.fragment:fragment-ktx:1.2.5")
|
||||||
|
implementation("androidx.lifecycle:lifecycle-livedata-core-ktx:2.2.0")
|
||||||
|
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0")
|
||||||
|
implementation("com.google.android.material:material:1.3.0-beta01")
|
||||||
|
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
|
||||||
|
|
||||||
|
implementation("com.squareup.retrofit2:retrofit:2.9.0")
|
||||||
|
|
||||||
|
implementation("com.squareup.moshi:moshi-kotlin:1.11.0")
|
||||||
|
implementation("com.squareup.moshi:moshi-kotlin-codegen:1.11.0")
|
||||||
|
implementation("com.squareup.moshi:moshi-adapters:1.11.0")
|
||||||
|
|
||||||
|
implementation("com.squareup.okhttp3:logging-interceptor:4.9.0")
|
||||||
|
|
||||||
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1")
|
||||||
|
|
||||||
|
implementation("org.koin:koin-android:2.2.1")
|
||||||
|
implementation("org.koin:koin-android-viewmodel:2.2.1")
|
||||||
|
implementation("org.koin:koin-android-ext:2.2.1")
|
||||||
|
|
||||||
|
testImplementation("io.kotest:kotest-runner-junit5:4.3.2")
|
||||||
|
testImplementation("io.kotest:kotest-assertions-core:4.3.2")
|
||||||
|
testImplementation("io.kotest:kotest-property:4.3.2")
|
||||||
|
testImplementation("io.mockk:mockk:1.10.4")
|
||||||
|
|
||||||
|
androidTestImplementation("io.mockk:mockk-android:1.10.4")
|
||||||
|
androidTestImplementation("androidx.test:core:1.3.0")
|
||||||
|
androidTestImplementation("androidx.test:runner:1.3.0")
|
||||||
|
androidTestImplementation("androidx.test:rules:1.3.0")
|
||||||
|
}
|
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,6 @@
|
||||||
#Thu Nov 19 13:31:11 GET 2020
|
#Sat Jan 09 23:28:33 GET 2021
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
|
||||||
|
|
|
@ -1,55 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
compileSdkVersion 30
|
|
||||||
buildToolsVersion "30.0.2"
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
minSdkVersion 16
|
|
||||||
targetSdkVersion 30
|
|
||||||
versionCode 1
|
|
||||||
versionName "1.0"
|
|
||||||
|
|
||||||
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 "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
||||||
implementation 'androidx.core:core-ktx:1.3.2'
|
|
||||||
|
|
||||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
|
||||||
implementation "com.squareup.retrofit2:converter-moshi:2.9.0"
|
|
||||||
|
|
||||||
implementation "com.squareup.moshi:moshi-kotlin:1.11.0"
|
|
||||||
implementation "com.squareup.moshi:moshi-kotlin-codegen:1.11.0"
|
|
||||||
implementation "com.squareup.moshi:moshi-adapters:1.11.0"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
implementation "com.squareup.okhttp3:logging-interceptor:4.9.0"
|
|
||||||
|
|
||||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1"
|
|
||||||
|
|
||||||
implementation "org.koin:koin-android:2.2.1"
|
|
||||||
implementation "org.koin:koin-android-viewmodel:2.2.1"
|
|
||||||
implementation "org.koin:koin-android-ext:2.2.1"
|
|
||||||
}
|
|
56
library-network/build.gradle.kts
Normal file
56
library-network/build.gradle.kts
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
kotlin("android")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdkVersion(30)
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
minSdkVersion(16)
|
||||||
|
targetSdkVersion(30)
|
||||||
|
versionCode = 1
|
||||||
|
versionName = "1.0"
|
||||||
|
|
||||||
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
consumerProguardFiles("consumer-rules.pro")
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
getByName("release") {
|
||||||
|
isMinifyEnabled = false
|
||||||
|
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = "1.8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(kotlin("stdlib"))
|
||||||
|
implementation("androidx.core:core-ktx:1.3.2")
|
||||||
|
|
||||||
|
implementation("com.squareup.retrofit2:retrofit:2.9.0")
|
||||||
|
implementation("com.squareup.retrofit2:converter-moshi:2.9.0")
|
||||||
|
|
||||||
|
implementation("com.squareup.moshi:moshi-kotlin:1.11.0")
|
||||||
|
implementation("com.squareup.moshi:moshi-kotlin-codegen:1.11.0")
|
||||||
|
implementation("com.squareup.moshi:moshi-adapters:1.11.0")
|
||||||
|
|
||||||
|
implementation("com.squareup.okhttp3:logging-interceptor:4.9.0")
|
||||||
|
|
||||||
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1")
|
||||||
|
|
||||||
|
implementation("org.koin:koin-android:2.2.1")
|
||||||
|
implementation("org.koin:koin-android-viewmodel:2.2.1")
|
||||||
|
implementation("org.koin:koin-android-ext:2.2.1")
|
||||||
|
}
|
|
@ -1,8 +0,0 @@
|
||||||
rootProject.name='Vanced Manager'
|
|
||||||
include ':app'
|
|
||||||
|
|
||||||
include ':core-presentation', ':core-ui' , ':core-mvi'
|
|
||||||
|
|
||||||
include ':feature-home'
|
|
||||||
|
|
||||||
include ':library-network'
|
|
9
settings.gradle.kts
Normal file
9
settings.gradle.kts
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
rootProject.name = "Vanced Manager"
|
||||||
|
|
||||||
|
include(":app")
|
||||||
|
|
||||||
|
include(":core-presentation", ":core-ui" , ":core-mvi")
|
||||||
|
|
||||||
|
include(":feature-home")
|
||||||
|
|
||||||
|
include(":library-network")
|
Loading…
Reference in a new issue