add template dependencies
This commit is contained in:
parent
f77bc0a8c5
commit
b99dec674c
|
|
@ -1,38 +1,129 @@
|
|||
plugins {
|
||||
id(Plugins.ANDROID_APP_PLUGIN_WITH_DEFAULT_CONFIG)
|
||||
id(Plugins.FIREBASE_CRASH)
|
||||
id(Plugins.GOOGLE_SERVICES)
|
||||
id(Plugins.LICENCE_PLUGIN)
|
||||
// id(Plugins.ANDROID_APP_PLUGIN_WITH_DEFAULT_CONFIG)
|
||||
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
alias(libs.plugins.kotlin.kapt)
|
||||
alias(libs.plugins.google.services)
|
||||
alias(libs.plugins.firebase.crashlytics)
|
||||
alias(libs.plugins.firebase.perf)
|
||||
id(libs.plugins.google.oss.licenses.plugin.get().pluginId)
|
||||
}
|
||||
|
||||
val customEndpoint: String? = Environment.ENDPOINT.getenv()?.takeIf(String::isNotBlank)
|
||||
|
||||
android {
|
||||
configureSigningConfig(this@Build_gradle::file)
|
||||
namespace = "ru.touchin.template"
|
||||
compileSdk = AndroidConfig.COMPILE_SDK_VERSION
|
||||
|
||||
with(defaultConfig) {
|
||||
defaultConfig {
|
||||
applicationId = Environment.APP_ID.getenv() ?: AndroidConfig.TEST_APP_ID
|
||||
signingConfig = signingConfigs.getByName(SigningConfig.CONFIG_NAME)
|
||||
versionCode = libs.versions.versionCode.get().toInt()
|
||||
versionName = libs.versions.versionName.get()
|
||||
|
||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
||||
minSdk = libs.versions.minSdk.get().toInt()
|
||||
targetSdk = libs.versions.targetSdk.get().toInt()
|
||||
}
|
||||
|
||||
firebaseCrashlytics {
|
||||
mappingFileUploadEnabled = true
|
||||
// configureSigningConfig(this@Build_gradle::file)
|
||||
|
||||
// with(defaultConfig) {
|
||||
// applicationId = Environment.APP_ID.getenv() ?: AndroidConfig.TEST_APP_ID
|
||||
// signingConfig = signingConfigs.getByName("debug")
|
||||
// }
|
||||
|
||||
buildTypes {
|
||||
getByName("debug") {
|
||||
isMinifyEnabled = false
|
||||
isShrinkResources = false
|
||||
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
|
||||
testProguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguardTest-rules.pro")
|
||||
}
|
||||
|
||||
getByName("release") {
|
||||
isMinifyEnabled = true
|
||||
isShrinkResources = true
|
||||
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
|
||||
testProguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguardTest-rules.pro")
|
||||
}
|
||||
}
|
||||
|
||||
addBuildType(BuildType.Debug, buildScriptDir = buildScriptDir)
|
||||
addBuildType(BuildType.Release, buildScriptDir = buildScriptDir)
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
androidExtensions {
|
||||
features = setOf("parcelize")
|
||||
buildFeatures.viewBinding = true
|
||||
|
||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class.java) {
|
||||
kotlinOptions {
|
||||
jvmTarget = "17"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(Library.ANDROIDX_APPCOMPAT)
|
||||
implementation(Library.ANDROIDX_CORE)
|
||||
implementation(Library.ANDROID_MATERIAL)
|
||||
implementation(Library.ANDROIDX_FRAGMENT)
|
||||
implementation(Library.ANDROIDX_FRAGMENT_KTX)
|
||||
// AndroidX
|
||||
implementation(libs.bundles.androidX)
|
||||
|
||||
// KotlinX
|
||||
implementation(libs.coroutines)
|
||||
|
||||
// UI
|
||||
implementation(libs.bundles.ui)
|
||||
|
||||
// Lifecycle
|
||||
implementation(libs.bundles.lifecycle)
|
||||
kapt(libs.androidx.lifecycle.compiler)
|
||||
|
||||
// Dagger
|
||||
implementation(libs.bundles.dagger)
|
||||
kapt(libs.dagger.compiler)
|
||||
kapt(libs.dagger.assisted.inject.processor)
|
||||
|
||||
// Glide
|
||||
implementation(libs.glide)
|
||||
implementation(libs.glide.okhttp3)
|
||||
kapt(libs.glide.compiler)
|
||||
|
||||
// Retrofit2, OkHttp3
|
||||
implementation(libs.retrofit)
|
||||
implementation(libs.retrofit.converter.moshi)
|
||||
implementation(libs.okhttp)
|
||||
implementation(libs.okhttp.logging.interceptor)
|
||||
|
||||
// Moshi
|
||||
implementation(libs.moshi)
|
||||
implementation(libs.moshi.kotlin)
|
||||
kapt(libs.moshi.codegen)
|
||||
|
||||
// Room
|
||||
implementation(libs.room)
|
||||
implementation(libs.room.ktx)
|
||||
kapt(libs.room.compiler)
|
||||
|
||||
// LeakCanary
|
||||
implementation(libs.leakcanary)
|
||||
|
||||
// Chucker
|
||||
debugImplementation(libs.chucker.debug)
|
||||
releaseImplementation(libs.chucker.release)
|
||||
|
||||
// GMS
|
||||
implementation(platform(libs.firebase.bom))
|
||||
implementation(libs.bundles.firebase)
|
||||
implementation(libs.google.oss.licenses)
|
||||
|
||||
// Security
|
||||
implementation(libs.androidx.security.crypto)
|
||||
|
||||
// Biometric
|
||||
implementation(libs.androidx.biometric)
|
||||
|
||||
// Groupie
|
||||
implementation(libs.groupie)
|
||||
implementation(libs.groupie.viewbinding)
|
||||
}
|
||||
|
||||
apply(from = "$buildScriptDir/gradle/scripts/applicationFileNaming.gradle")
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
"client_info": {
|
||||
"mobilesdk_app_id": "1:1084813714260:android:b6d7bb18a0acfe96255ec1",
|
||||
"android_client_info": {
|
||||
"package_name": "com.touchin.template"
|
||||
"package_name": "ru.touchin.template"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<manifest
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="ru.touchin.template">
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,31 +1,26 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
mavenCentral()
|
||||
maven("https://plugins.gradle.org/m2/")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:${Version.ANDROID_PLUGIN}")
|
||||
classpath(kotlin("gradle-plugin", version = Version.KOTLIN))
|
||||
classpath("com.google.gms:google-services:${Version.GOOGLE_SERVICES_PLUGIN}")
|
||||
classpath("com.google.firebase:firebase-crashlytics-gradle:${Version.FIREBASE_CRASH_PLUGIN}")
|
||||
classpath("com.vanniktech:gradle-dependency-graph-generator-plugin:0.5.0")
|
||||
classpath("com.google.android.gms:oss-licenses-plugin:0.10.2")
|
||||
// classpath("com.vanniktech:gradle-dependency-graph-generator-plugin:0.5.0")
|
||||
classpath(libs.google.oss.licenses.plugin)
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id(Plugins.DEPENDENCY_GRAPH).version("0.5.0")
|
||||
// id(Plugins.DEPENDENCY_GRAPH).version("0.5.0")
|
||||
// id("static-analysis-android")
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
maven("http://dl.bintray.com/touchin/touchin-tools")
|
||||
maven("https://jitpack.io")
|
||||
}
|
||||
alias(libs.plugins.android.application) apply false
|
||||
alias(libs.plugins.kotlin.android) apply false
|
||||
alias(libs.plugins.kotlin.kapt) apply false
|
||||
alias(libs.plugins.google.services) apply false
|
||||
alias(libs.plugins.firebase.crashlytics) apply false
|
||||
alias(libs.plugins.firebase.perf) apply false
|
||||
}
|
||||
|
||||
val buildScriptsDir = "${rootProject.projectDir}/BuildScripts"
|
||||
|
|
|
|||
|
|
@ -1,33 +1,10 @@
|
|||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
`kotlin-dsl`
|
||||
`kotlin-dsl-precompiled-script-plugins`
|
||||
kotlin("jvm") version embeddedKotlinVersion
|
||||
// `kotlin-dsl-precompiled-script-plugins`
|
||||
// kotlin("jvm") version embeddedKotlinVersion
|
||||
}
|
||||
|
||||
// The kotlin-dsl plugin requires a repository to be declared
|
||||
repositories {
|
||||
jcenter()
|
||||
google()
|
||||
maven {
|
||||
url = uri("https://plugins.gradle.org/m2/")
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// android gradle plugin, required by custom plugin
|
||||
implementation("com.android.tools.build:gradle:4.0.0")
|
||||
|
||||
// kotlin plugin, required by custom plugin
|
||||
implementation(kotlin("gradle-plugin", embeddedKotlinVersion))
|
||||
|
||||
gradleKotlinDsl()
|
||||
implementation(kotlin("stdlib-jdk8"))
|
||||
}
|
||||
|
||||
|
||||
val compileKotlin: KotlinCompile by tasks
|
||||
compileKotlin.kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
mavenCentral()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,171 @@
|
|||
[versions]
|
||||
|
||||
# Project
|
||||
versionCode = "1"
|
||||
versionName = "1.0.0"
|
||||
compileSdk = "34"
|
||||
targetSdk = "34"
|
||||
minSdk = "23"
|
||||
|
||||
kotlin = "1.8.22"
|
||||
androidGradlePlugin = "8.1.4"
|
||||
|
||||
# AndroidX
|
||||
androidxCompat = "1.6.1"
|
||||
androidxConstraint = "2.1.4"
|
||||
androidxCore = "1.12.0"
|
||||
androidxRecycler = "1.3.2"
|
||||
|
||||
# UI
|
||||
androidxActivity = "1.8.2"
|
||||
androidxBiometric = "1.1.0"
|
||||
androidxFragment = "1.6.2"
|
||||
androidxSecurity = "1.1.0-alpha06"
|
||||
androidxSwipeRefresh = "1.1.0"
|
||||
material = "1.11.0"
|
||||
|
||||
# Lifecyle
|
||||
androidxLifecycle = "2.7.0"
|
||||
|
||||
# Dagger
|
||||
dagger = "2.51"
|
||||
daggerAssistedInject = "0.8.1"
|
||||
daggerComponentsManager = "2.1.1"
|
||||
|
||||
# Glide
|
||||
glide = "4.16.0"
|
||||
|
||||
# Retrofit2, OkHttp3
|
||||
retrofit = "2.9.0"
|
||||
okhttp = "4.12.0"
|
||||
|
||||
# Moshi
|
||||
moshi = "1.15.1"
|
||||
|
||||
#Room
|
||||
room = "2.6.1"
|
||||
|
||||
# KotlinX
|
||||
coroutines = "1.8.0"
|
||||
|
||||
cicerone = "7.1"
|
||||
leakCanary = "2.13"
|
||||
chucker = "4.0.0"
|
||||
javapoet = "1.13.0"
|
||||
|
||||
# GMS
|
||||
googleServices = "4.4.1"
|
||||
googleLicenses = "17.0.1"
|
||||
googleLicensesPlugin = "0.10.6"
|
||||
firebaseBom = "32.7.4"
|
||||
firebaseCrashlytics = "2.9.9"
|
||||
firebasePerf = "1.4.2"
|
||||
|
||||
# Groupie
|
||||
groupie = "2.10.1"
|
||||
|
||||
[libraries]
|
||||
|
||||
# AndroidX
|
||||
androidx-compat = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidxCompat" }
|
||||
androidx-constraint = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "androidxConstraint" }
|
||||
androidx-core = { group = "androidx.core", name = "core-ktx", version.ref = "androidxCore" }
|
||||
androidx-recycler = { group = "androidx.recyclerview", name = "recyclerview", version.ref = "androidxRecycler" }
|
||||
|
||||
# KotlinX
|
||||
coroutines = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "coroutines" }
|
||||
|
||||
# UI
|
||||
androidx-activity = { group = "androidx.activity", name = "activity-ktx", version.ref = "androidxActivity" }
|
||||
anroidx-fragment-ktx = { group = "androidx.fragment", name = "fragment-ktx", version.ref = "androidxFragment" }
|
||||
androidx-swipe-refresh = { group = "androidx.swiperefreshlayout", name = "swiperefreshlayout", version.ref = "androidxSwipeRefresh" }
|
||||
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
|
||||
|
||||
# Lifecyle
|
||||
androidx-lifecycle-compiler = { group = "androidx.lifecycle", name = "lifecycle-compiler", version.ref = "androidxLifecycle" }
|
||||
androidx-lifecycle-livedata-ktx = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "androidxLifecycle" }
|
||||
androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "androidxLifecycle" }
|
||||
androidx-lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "androidxLifecycle" }
|
||||
|
||||
# Dagger
|
||||
dagger = { group = "com.google.dagger", name = "dagger", version.ref = "dagger" }
|
||||
dagger-compiler = { group = "com.google.dagger", name = "dagger-compiler", version.ref = "dagger" }
|
||||
dagger-assisted-inject-annotations = { group = "com.squareup.inject", name = "assisted-inject-annotations-dagger2", version.ref = "daggerAssistedInject" }
|
||||
dagger-assisted-inject-processor = { group = "com.squareup.inject", name = "assisted-inject-processor-dagger2", version.ref = "daggerAssistedInject" }
|
||||
dagger-components-manager = { group = "com.github.valeryponomarenko.componentsmanager", name = "androidx", version.ref = "daggerComponentsManager" }
|
||||
|
||||
# Glide
|
||||
glide = { group = "com.github.bumptech.glide", name = "glide", version.ref = "glide" }
|
||||
glide-compiler = { group = "com.github.bumptech.glide", name = "compiler", version.ref = "glide" }
|
||||
glide-okhttp3 = { group = "com.github.bumptech.glide", name = "okhttp3-integration", version.ref = "glide" }
|
||||
|
||||
# Retrofit2, OkHttp3
|
||||
retrofit = { group = "com.squareup.retrofit2", name = "retrofit", version.ref = "retrofit" }
|
||||
retrofit-converter-moshi = { group = "com.squareup.retrofit2", name = "converter-moshi", version.ref = "retrofit" }
|
||||
okhttp = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okhttp" }
|
||||
okhttp-logging-interceptor = { group = "com.squareup.okhttp3", name = "logging-interceptor", version.ref = "okhttp" }
|
||||
|
||||
# Moshi
|
||||
moshi = { group = "com.squareup.moshi", name = "moshi", version.ref = "moshi" }
|
||||
moshi-codegen = { group = "com.squareup.moshi", name = "moshi-kotlin-codegen", version.ref = "moshi" }
|
||||
moshi-kotlin = { group = "com.squareup.moshi", name = "moshi-kotlin", version.ref = "moshi" }
|
||||
|
||||
# Room
|
||||
room = { group = "androidx.room", name = "room-runtime", version.ref = "room" }
|
||||
room-compiler = { group = "androidx.room", name = "room-compiler", version.ref = "room" }
|
||||
room-ktx = { group = "androidx.room", name = "room-ktx", version.ref = "room" }
|
||||
|
||||
# Cicerone
|
||||
cicerone = { group = "com.github.terrakok", name = "cicerone", version.ref = "cicerone" }
|
||||
|
||||
# LeakCanary
|
||||
leakcanary= { group = "com.squareup.leakcanary", name = "leakcanary-android", version.ref = "leakCanary" }
|
||||
|
||||
# Chucker
|
||||
chucker-debug = { group = "com.github.chuckerteam.chucker", name = "library", version.ref = "chucker" }
|
||||
chucker-release = { group = "com.github.chuckerteam.chucker", name = "library-no-op", version.ref = "chucker" }
|
||||
|
||||
# GMS
|
||||
firebase-bom = { group = "com.google.firebase", name = "firebase-bom", version.ref = "firebaseBom" }
|
||||
firebase-analytics = { module = "com.google.firebase:firebase-analytics" }
|
||||
firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics" }
|
||||
firebase-perf = { module = "com.google.firebase:firebase-perf" }
|
||||
google-oss-licenses = { group = "com.google.android.gms", name = "play-services-oss-licenses", version.ref = "googleLicenses" }
|
||||
google-oss-licenses-plugin = { group = "com.google.android.gms", name = "oss-licenses-plugin", version.ref = "googleLicensesPlugin" }
|
||||
|
||||
# Security
|
||||
androidx-security-crypto = { group = "androidx.security", name = "security-crypto", version.ref = "androidxSecurity" }
|
||||
|
||||
# Biometric
|
||||
androidx-biometric = { group = "androidx.biometric", name = "biometric", version.ref = "androidxBiometric" }
|
||||
|
||||
# Groupie
|
||||
groupie = { group = "com.github.lisawray.groupie", name = "groupie", version.ref = "groupie" }
|
||||
groupie-viewbinding = { group = "com.github.lisawray.groupie", name = "groupie-viewbinding", version.ref = "groupie" }
|
||||
|
||||
javapoet = { module = "com.squareup:javapoet", version = "javapoet" }
|
||||
|
||||
[plugins]
|
||||
|
||||
[bundles]
|
||||
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
|
||||
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
|
||||
android-test = { id = "com.android.test", version.ref = "androidGradlePlugin" }
|
||||
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
||||
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
|
||||
google-services = { id = "com.google.gms.google-services", version.ref = "googleServices" }
|
||||
google-oss-licenses-plugin = { id = "com.google.android.gms.oss-licenses-plugin", version.ref = "googleLicensesPlugin" }
|
||||
firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebaseCrashlytics" }
|
||||
firebase-perf = { id = "com.google.firebase.firebase-perf", version.ref = "firebasePerf" }
|
||||
|
||||
[bundles]
|
||||
|
||||
androidX = ["androidx-compat", "androidx-constraint", "androidx-core", "androidx-recycler"]
|
||||
|
||||
ui = ["androidx-activity", "anroidx-fragment-ktx", "androidx-swipe-refresh", "material"]
|
||||
|
||||
lifecycle = ["androidx-lifecycle-livedata-ktx", "androidx-lifecycle-runtime-ktx", "androidx-lifecycle-viewmodel-ktx"]
|
||||
|
||||
dagger = ["dagger", "dagger-assisted-inject-annotations", "dagger-components-manager"]
|
||||
|
||||
firebase = ["firebase-analytics", "firebase-crashlytics", "firebase-perf"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#Thu Feb 13 13:31:53 MSK 2020
|
||||
#Tue Mar 19 16:59:59 GMT+07:00 2024
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
|
||||
|
|
|
|||
|
|
@ -1,17 +1,20 @@
|
|||
includeBuild("BuildScripts/gradle/plugins")
|
||||
pluginManagement {
|
||||
includeBuild("BuildScripts/gradle/plugins")
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
google()
|
||||
}
|
||||
}
|
||||
|
||||
val roboswagModules = listOf(
|
||||
"utils",
|
||||
"logging",
|
||||
"recyclerview-decorators",
|
||||
"kotlin-extensions"
|
||||
)
|
||||
//roboswagModules.forEach { module ->
|
||||
// val moduleDir = file("RoboSwag/$module")
|
||||
// if (moduleDir.isDirectory) {
|
||||
// include(":$module")
|
||||
// project(":$module").projectDir = moduleDir
|
||||
// }
|
||||
//}
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
maven("https://dl.bintray.com/touchin/touchin-tools")
|
||||
maven("https://jitpack.io")
|
||||
}
|
||||
}
|
||||
|
||||
include(":app")
|
||||
|
|
|
|||
Loading…
Reference in New Issue