Skip to content

Commit e7d6aa7

Browse files
authored
Merge pull request #1 from KryptKode/chore/deps-setup
Chore/deps setup
2 parents 1a22489 + 90097f2 commit e7d6aa7

File tree

11 files changed

+477
-34
lines changed

11 files changed

+477
-34
lines changed

app/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ android {
3434

3535
dependencies {
3636

37-
implementation Libs.kotlin_stdlib
38-
implementation Libs.core_ktx
39-
implementation Libs.appcompat
40-
implementation Libs.material
41-
testImplementation Libs.junit_junit
42-
androidTestImplementation Libs.androidx_test_ext_junit
43-
androidTestImplementation Libs.espresso_core
37+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
38+
implementation 'androidx.core:core-ktx:1.3.2'
39+
implementation 'androidx.appcompat:appcompat:1.2.0'
40+
implementation 'com.google.android.material:material:1.2.1'
41+
testImplementation 'junit:junit:4.13.1'
42+
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
43+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
4444
}

build.gradle.kts

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3+
24
buildscript {
5+
val kotlin_version by extra("1.4.21")
36
repositories {
47
google()
58
jcenter()
69
}
710
dependencies {
8-
classpath("com.android.tools.build:gradle:4.1.1")
9-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21")
10-
11-
// NOTE: Do not place your application dependencies here; they belong
12-
// in the individual module build.gradle files
11+
classpath(Libs.com_android_tools_build_gradle)
12+
classpath(Libs.kotlin_gradle_plugin)
13+
classpath(Libs.hilt_android_gradle_plugin)
1314
}
1415
}
1516

@@ -23,6 +24,16 @@ allprojects {
2324
google()
2425
jcenter()
2526
}
27+
28+
tasks.withType<KotlinCompile>().configureEach {
29+
kotlinOptions.freeCompilerArgs +=
30+
"-Xuse-experimental=" +
31+
"kotlin.Experimental," +
32+
"kotlinx.coroutines.ExperimentalCoroutinesApi," +
33+
"kotlinx.coroutines.InternalCoroutinesApi," +
34+
"kotlinx.coroutines.ObsoleteCoroutinesApi," +
35+
"kotlinx.coroutines.FlowPreview"
36+
}
2637
}
2738

2839
tasks.register("clean", Delete::class) {

buildSrc/.gitignore

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,86 @@
1+
# Built application files
2+
*.apk
3+
*.aar
4+
*.ap_
5+
*.aab
6+
7+
# Files for the ART/Dalvik VM
8+
*.dex
9+
10+
# Java class files
11+
*.class
12+
13+
# Generated files
14+
bin/
15+
gen/
16+
out/
17+
# Uncomment the following line in case you need and you don't have the release build type files in your app
18+
# release/
19+
20+
# Gradle files
121
.gradle/
2-
build/
22+
build/
23+
24+
# Local configuration file (sdk path, etc)
25+
local.properties
26+
27+
# Proguard folder generated by Eclipse
28+
proguard/
29+
30+
# Log Files
31+
*.log
32+
33+
# Android Studio Navigation editor temp files
34+
.navigation/
35+
36+
# Android Studio captures folder
37+
captures/
38+
39+
# IntelliJ
40+
*.iml
41+
.idea/
42+
.idea/workspace.xml
43+
.idea/tasks.xml
44+
.idea/gradle.xml
45+
.idea/assetWizardSettings.xml
46+
.idea/dictionaries
47+
.idea/libraries
48+
# Android Studio 3 in .gitignore file.
49+
.idea/caches
50+
.idea/modules.xml
51+
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
52+
.idea/navEditor.xml
53+
54+
# Keystore files
55+
# Uncomment the following lines if you do not want to check your keystore files in.
56+
*.jks
57+
*.keystore
58+
59+
# External native build folder generated in Android Studio 2.2 and later
60+
.externalNativeBuild
61+
.cxx/
62+
63+
# Google Services (e.g. APIs or Firebase)
64+
google-services.json
65+
66+
# Freeline
67+
freeline.py
68+
freeline/
69+
freeline_project_description.json
70+
71+
# fastlane
72+
fastlane/report.xml
73+
fastlane/Preview.html
74+
fastlane/screenshots
75+
fastlane/test_output
76+
fastlane/readme.md
77+
78+
# Version control
79+
vcs.xml
80+
81+
# lint
82+
lint/intermediates/
83+
lint/generated/
84+
lint/outputs/
85+
lint/tmp/
86+
# lint/reports/

buildSrc/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ object Dependencies {
1414
const val kotlinGradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21"
1515
const val detektGradlePlugin = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.15.0"
1616
const val klintGradlePlugin = "org.jlleitschuh.gradle:ktlint-gradle:9.4.1"
17+
const val daggerHilt: String = "com.google.dagger:hilt-android-gradle-plugin:2.28.3-alpha"
1718
}
1819

1920
dependencies {
2021
implementation(Dependencies.androidGradlePlugin)
2122
implementation(Dependencies.kotlinGradlePlugin)
2223
implementation(Dependencies.detektGradlePlugin)
2324
implementation(Dependencies.klintGradlePlugin)
25+
implementation(Dependencies.daggerHilt)
2426
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
object BuildTypes {
2+
const val DEBUG = "debug"
3+
const val RELEASE = "release"
4+
}

0 commit comments

Comments
 (0)