| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- buildscript {
- ext.kotlin_version = '1.6.10'
- ext.kotlin_coroutines_version = '1.6.0'
- ext.slf4j_version = '1.7.32'
- ext.junit_version = '4.13.2'
- repositories {
- google()
- mavenCentral()
- flatDir { dirs 'app/libs' }
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:7.0.3'
- classpath 'org.owasp:dependency-check-gradle:6.5.3'
- classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.18'
- // Huawei agconnect plugin
- classpath 'com.huawei.agconnect:agcp-1.6.0.300'
- classpath 'com.huawei.agconnect:agconnect-crash-symbol-lib-1.6.0.300'
- classpath 'com.huawei.agconnect:agconnect-apms-plugin-1.5.2.302'
- classpath 'com.huawei.agconnect:agconnect-core-1.5.0.300@aar'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
- }
- plugins {
- id 'jacoco'
- id 'org.sonarqube' version '3.0'
- }
- allprojects {
- repositories {
- google()
- mavenCentral()
- maven { url 'https://jitpack.io' }
- jcenter()
- flatDir { dirs 'libs' }
- // Huawei
- exclusiveContent {
- forRepository {
- maven { url 'https://developer.huawei.com/repo/' }
- }
- filter {
- // Only matching dependencies will be installed from this repository.
- includeGroup "com.huawei.hms"
- includeGroup "com.huawei.android.hms"
- includeGroup "com.huawei.hmf"
- }
- }
- }
- // OWASP dependency-check-gradle plugin
- apply plugin: 'org.owasp.dependencycheck'
- dependencyCheck {
- skipConfigurations += 'lintClassPath'
- suppressionFile 'dependencyCheckSuppressions.xml'
- // Fail dependency check if any dependency has a CVE with a score of 3+
- failBuildOnCVSS 3
- }
- group = 'ch.threema'
- }
- wrapper {
- distributionType = Wrapper.DistributionType.ALL
- }
- sonarqube {
- properties {
- property 'sonar.projectKey', 'android-client'
- property 'sonar.projectName', 'Threema for Android'
- }
- }
- jacoco {
- toolVersion = '0.8.7'
- }
- subprojects {
- configurations.all {
- resolutionStrategy {
- eachDependency { details ->
- if ('org.jacoco' == details.requested.group) {
- details.useVersion "0.8.7"
- }
- }
- }
- }
- }
- // task to gather code coverage from multiple subprojects
- // NOTE: the `JacocoReport` tasks do *not* depend on the `test` task by default. Meaning you have to ensure
- // that `test` (or other tasks generating code coverage) run before generating the report.
- tasks.register("codeCoverageReport", JacocoReport) {
- // If a subproject applies the 'jacoco' plugin, add the result it to the report
- subprojects { subproject ->
- subproject.plugins.withType(JacocoPlugin).configureEach {
- subproject.tasks.matching({ t -> t.extensions.findByType(JacocoTaskExtension) }).configureEach { testTask ->
- sourceSets subproject.sourceSets.main
- executionData(testTask)
- }
- }
- }
- reports {
- xml.enabled true
- }
- }
|