diff --git a/app/build.gradle b/app/build.gradle deleted file mode 100644 index de0c8562..00000000 --- a/app/build.gradle +++ /dev/null @@ -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 langs = new ArrayList() - 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 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' -} diff --git a/app/build.gradle.kts b/app/build.gradle.kts new file mode 100644 index 00000000..b53c0eca --- /dev/null +++ b/app/build.gradle.kts @@ -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 { + kotlinOptions { + jvmTarget = "1.8" + } + } + +} + +fun getLanguages(): Array { + 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.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") +} diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index cad0175a..761aa457 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # 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 # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/build.gradle b/build.gradle deleted file mode 100644 index b7593355..00000000 --- a/build.gradle +++ /dev/null @@ -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 -} diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 00000000..1bbdcef6 --- /dev/null +++ b/build.gradle.kts @@ -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("clean") { + delete(rootProject.buildDir) +} \ No newline at end of file diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts new file mode 100644 index 00000000..051fc628 --- /dev/null +++ b/buildSrc/build.gradle.kts @@ -0,0 +1,9 @@ +plugins { + `kotlin-dsl` +} + +repositories { + google() + jcenter() + maven(url = "https://jitpack.io") +} \ No newline at end of file diff --git a/buildSrc/src/main/java/Config.kt b/buildSrc/src/main/java/Config.kt new file mode 100644 index 00000000..ce6e1f7e --- /dev/null +++ b/buildSrc/src/main/java/Config.kt @@ -0,0 +1,5 @@ +object Config { + + const val kotlinVersion = "1.4.21" + +} \ No newline at end of file diff --git a/core-mvi/build.gradle b/core-mvi/build.gradle deleted file mode 100644 index 3beb9d8a..00000000 --- a/core-mvi/build.gradle +++ /dev/null @@ -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" -} \ No newline at end of file diff --git a/core-mvi/build.gradle.kts b/core-mvi/build.gradle.kts new file mode 100644 index 00000000..c359ea8f --- /dev/null +++ b/core-mvi/build.gradle.kts @@ -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") +} \ No newline at end of file diff --git a/core-presentation/build.gradle b/core-presentation/build.gradle deleted file mode 100644 index ddc8a571..00000000 --- a/core-presentation/build.gradle +++ /dev/null @@ -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' -} \ No newline at end of file diff --git a/core-presentation/build.gradle.kts b/core-presentation/build.gradle.kts new file mode 100644 index 00000000..85d1b3ca --- /dev/null +++ b/core-presentation/build.gradle.kts @@ -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 { + kotlinOptions { + jvmTarget = "1.8" + } + } + +} + +dependencies { + implementation(kotlin("stdlib")) + implementation("androidx.core:core-ktx:1.3.2") + implementation("androidx.appcompat:appcompat:1.2.0") +} \ No newline at end of file diff --git a/core-ui/build.gradle b/core-ui/build.gradle deleted file mode 100644 index 825307cb..00000000 --- a/core-ui/build.gradle +++ /dev/null @@ -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' -} \ No newline at end of file diff --git a/core-ui/build.gradle.kts b/core-ui/build.gradle.kts new file mode 100644 index 00000000..b79c8ebf --- /dev/null +++ b/core-ui/build.gradle.kts @@ -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 { + 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") +} \ No newline at end of file diff --git a/feature-home/build.gradle b/feature-home/build.gradle deleted file mode 100644 index 5105ed9d..00000000 --- a/feature-home/build.gradle +++ /dev/null @@ -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' -} \ No newline at end of file diff --git a/feature-home/build.gradle.kts b/feature-home/build.gradle.kts new file mode 100644 index 00000000..ae53370f --- /dev/null +++ b/feature-home/build.gradle.kts @@ -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 { + 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") +} \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ebbfb8e9..cef5a4c7 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Nov 19 13:31:11 GET 2020 +#Sat Jan 09 23:28:33 GET 2021 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME 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 diff --git a/library-network/build.gradle b/library-network/build.gradle deleted file mode 100644 index a2113814..00000000 --- a/library-network/build.gradle +++ /dev/null @@ -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" -} \ No newline at end of file diff --git a/library-network/build.gradle.kts b/library-network/build.gradle.kts new file mode 100644 index 00000000..2f9140be --- /dev/null +++ b/library-network/build.gradle.kts @@ -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 { + 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") +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index d264cef5..00000000 --- a/settings.gradle +++ /dev/null @@ -1,8 +0,0 @@ -rootProject.name='Vanced Manager' -include ':app' - -include ':core-presentation', ':core-ui' , ':core-mvi' - -include ':feature-home' - -include ':library-network' diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 00000000..e7d18a0a --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,9 @@ +rootProject.name = "Vanced Manager" + +include(":app") + +include(":core-presentation", ":core-ui" , ":core-mvi") + +include(":feature-home") + +include(":library-network")