Skip to content

Commit

Permalink
Gradle files improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
philips77 committed Oct 6, 2022
1 parent 14e3ca0 commit 01ae5ba
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 37 deletions.
17 changes: 10 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
id 'kotlin-android'
id 'kotlin-parcelize'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
id 'com.google.dagger.hilt.android'
}
apply from: rootProject.file("gradle/git-tag-version.gradle")

Expand Down Expand Up @@ -43,16 +43,19 @@ android {
}
}

buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion compose_compiler_version
}
hilt {
enableExperimentalClasspathAggregation = true
buildFeatures {
compose true
}
}
hilt {
enableAggregatingTask = true
}
kapt {
correctErrorTypes true
}

dependencies {
implementation project(":lib_analytics")
Expand All @@ -67,5 +70,5 @@ dependencies {
implementation "androidx.activity:activity-compose:1.6.0"

implementation "com.google.dagger:hilt-android:$dagger_version"
kapt "com.google.dagger:hilt-compiler:$dagger_version"
kapt "com.google.dagger:hilt-android-compiler:$dagger_version"
}
22 changes: 13 additions & 9 deletions lib_analytics/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'dagger.hilt.android.plugin'
apply plugin: 'kotlin-kapt'
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
id 'com.google.dagger.hilt.android'
}

android {
namespace 'no.nordicsemi.android.dfu.analytics'
Expand All @@ -20,15 +22,17 @@ android {
consumerProguardFiles 'analytics-proguard-rules.pro'
}
}

hilt {
enableExperimentalClasspathAggregation = true
}
}
hilt {
enableAggregatingTask = true
}
kapt {
correctErrorTypes true
}

dependencies {
implementation "no.nordicsemi.android.common:analytics:$nordic_common_version"

implementation "com.google.dagger:hilt-android:$dagger_version"
kapt "com.google.dagger:hilt-compiler:$dagger_version"
kapt "com.google.dagger:hilt-android-compiler:$dagger_version"
}
4 changes: 3 additions & 1 deletion lib_dfu/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
apply plugin: 'com.android.library'
plugins {
id 'com.android.library'
}
apply from: rootProject.file("gradle/git-tag-version.gradle")

android {
Expand Down
23 changes: 13 additions & 10 deletions lib_storage/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'dagger.hilt.android.plugin'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-parcelize'
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
id 'com.google.dagger.hilt.android'
}

android {
namespace 'no.nordicsemi.android.dfu.storage'
Expand Down Expand Up @@ -30,15 +31,17 @@ android {
composeOptions {
kotlinCompilerExtensionVersion compose_compiler_version
}

hilt {
enableExperimentalClasspathAggregation = true
}
}
hilt {
enableAggregatingTask = true
}
kapt {
correctErrorTypes true
}

dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4"

implementation "com.google.dagger:hilt-android:$dagger_version"
kapt "com.google.dagger:hilt-compiler:$dagger_version"
kapt "com.google.dagger:hilt-android-compiler:$dagger_version"
}
24 changes: 14 additions & 10 deletions profile_dfu/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'dagger.hilt.android.plugin'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-parcelize'
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-parcelize'
id 'kotlin-kapt'
id 'com.google.dagger.hilt.android'
}

android {
namespace 'no.nordicsemi.android.dfu.profile'
Expand Down Expand Up @@ -34,10 +36,12 @@ android {
buildFeatures {
compose true
}

hilt {
enableExperimentalClasspathAggregation = true
}
}
hilt {
enableAggregatingTask = true
}
kapt {
correctErrorTypes true
}

dependencies {
Expand All @@ -63,6 +67,6 @@ dependencies {
implementation "androidx.datastore:datastore-preferences:1.0.0"

implementation "com.google.dagger:hilt-android:$dagger_version"
kapt "com.google.dagger:hilt-compiler:$dagger_version"
kapt "com.google.dagger:hilt-android-compiler:$dagger_version"
implementation "androidx.hilt:hilt-navigation-compose:1.0.0"
}

0 comments on commit 01ae5ba

Please sign in to comment.