97 lines
2.8 KiB
Groovy
97 lines
2.8 KiB
Groovy
/*
|
|
* Copyright 2020 Shreyas Patil
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
buildscript {
|
|
apply from: 'dependencies.gradle'
|
|
apply from: 'projectConfig.gradle'
|
|
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
maven {
|
|
url("https://plugins.gradle.org/m2/")
|
|
}
|
|
}
|
|
dependencies {
|
|
classpath "com.android.tools.build:gradle:${androidGradlePluginVersion}"
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
|
classpath "com.google.dagger:hilt-android-gradle-plugin:$daggerHiltVersion"
|
|
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigationVersion"
|
|
classpath "org.jlleitschuh.gradle:ktlint-gradle:$ktlintVersion"
|
|
classpath "org.jacoco:org.jacoco.core:$jacocoVersion"
|
|
classpath "org.jetbrains.kotlinx:kover:$koverVersion"
|
|
classpath "dev.shreyaspatil.compose-compiler-report-generator:gradle-plugin:$composeCompilerReportGenVersion"
|
|
}
|
|
}
|
|
plugins {
|
|
id 'com.google.devtools.ksp' version "$kspVersion" apply false
|
|
}
|
|
apply from: 'dependencies.gradle'
|
|
apply from: 'projectConfig.gradle'
|
|
apply plugin: 'kover'
|
|
|
|
allprojects {
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
|
}
|
|
}
|
|
|
|
subprojects {
|
|
apply plugin: 'org.jlleitschuh.gradle.ktlint'
|
|
apply plugin: 'jacoco'
|
|
|
|
jacoco {
|
|
toolVersion = jacocoVersion
|
|
reportsDirectory.set(layout.buildDirectory.dir("jacocoReports"))
|
|
}
|
|
|
|
ktlint {
|
|
debug = false
|
|
android = true
|
|
outputToConsole = true
|
|
outputColorName = "RED"
|
|
}
|
|
}
|
|
|
|
task clean(type: Delete) {
|
|
delete rootProject.buildDir
|
|
}
|
|
|
|
koverMerged {
|
|
enable()
|
|
|
|
htmlReport {
|
|
onCheck.set(false)
|
|
reportDir.set(layout.buildDirectory.dir(layout.buildDirectory.dir("kover-project-report/html-result")))
|
|
}
|
|
|
|
filters {
|
|
classes {
|
|
// class exclusion rules
|
|
excludes.addAll([
|
|
'dagger.hilt.*',
|
|
'hilt_aggregated_deps.*',
|
|
'dev.shreyaspatil.noty.simpleapp.databinding.*',
|
|
'*.Hilt_*',
|
|
'*.*_MembersInjector*'
|
|
])
|
|
}
|
|
}
|
|
}
|