-
Notifications
You must be signed in to change notification settings - Fork 168
Expand file tree
/
Copy pathbuild.gradle
More file actions
108 lines (95 loc) · 3.33 KB
/
Copy pathbuild.gradle
File metadata and controls
108 lines (95 loc) · 3.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
plugins {
id "com.android.library"
id "kotlin-android"
id "maven-publish"
id "com.mxalbert.gradle.jacoco-android"
}
android {
namespace "org.matomo.sdk"
defaultConfig {
minSdkVersion project.ext.globalMinSdkVersion
compileSdk project.ext.globalCompileSdkVersion
targetSdkVersion project.ext.globalTargetSdkVersion
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
testOptions.unitTests.includeAndroidResources = true
}
dependencies {
implementation "androidx.annotation:annotation:1.9.1"
implementation "com.github.AppDevNext.Logcat:LogcatCoreLib:3.4"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
testImplementation "org.awaitility:awaitility:4.3.0"
testImplementation "androidx.test:core:1.7.0"
// Robolectric
testImplementation "junit:junit:4.13.2"
testImplementation "org.hamcrest:hamcrest-core:3.0"
testImplementation "org.hamcrest:hamcrest-library:3.0"
testImplementation "org.hamcrest:hamcrest-integration:1.3"
testImplementation "com.squareup.okhttp3:mockwebserver:5.3.0"
// Mocktio
testImplementation "org.mockito:mockito-core:5.20.0"
testImplementation "org.json:json:20250517"
testImplementation "org.robolectric:robolectric:4.16.1"
}
jacoco {
toolVersion = "0.8.10"
}
tasks.withType(Test).configureEach {
jacoco.includeNoLocationClasses = true
jacoco.excludes = ["jdk.internal.*"]
}
/**
* Javadoc
*/
android.libraryVariants.configureEach { variant ->
task("generate${variant.name.capitalize()}Javadoc", type: Javadoc) {
title = "Documentation for Android $android.defaultConfig.versionName b$android.defaultConfig.versionCode"
destinationDir = new File("${project.getProjectDir()}/build/docs/javadoc/")
ext.androidJar = "${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar"
source = variant.javaCompiler.source
doFirst {
classpath = files(variant.javaCompile.classpath.files) + files(ext.androidJar)
}
description "Generates Javadoc for $variant.name."
options.memberLevel = JavadocMemberLevel.PRIVATE
options.links("http://docs.oracle.com/javase/7/docs/api/")
options.links("http://developer.android.com/reference/reference/")
exclude "**/BuildConfig.java"
exclude "**/R.java"
}
}
publishing {
publications {
release(MavenPublication) {
afterEvaluate {
from components.release {
pom {
licenses {
license {
name = "BSD 3-Clause 'New' or 'Revised' License"
url = "https://github.com/matomo-org/matomo-sdk-android/blob/master/LICENSE"
}
}
}
}
}
}
}
}
@SuppressWarnings("unused")
static def getTag() {
def process = "git describe --tags".execute()
return process.text.toString().trim()
}