-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathbuild.gradle
More file actions
121 lines (100 loc) · 3.95 KB
/
build.gradle
File metadata and controls
121 lines (100 loc) · 3.95 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
109
110
111
112
113
114
115
116
117
118
119
120
121
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'checkstyle'
android {
compileSdk 34
namespace 'com.iterable.iterableapi'
testNamespace 'iterable.com.iterableapi'
buildFeatures {
buildConfig = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
defaultConfig {
minSdkVersion 21
targetSdkVersion 34
buildConfigField "String", "ITERABLE_SDK_VERSION", "\"3.6.4\""
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
publishing {
multipleVariants {
allVariants()
withJavadocJar()
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
manifestPlaceholders = [usesCleartextTraffic: "false"]
}
debug {
enableAndroidTestCoverage true
multiDexEnabled true
manifestPlaceholders = [usesCleartextTraffic: "true"]
}
}
testOptions.unitTests.all {
testLogging {
exceptionFormat "full"
}
}
testOptions.unitTests.includeAndroidResources = true
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
api 'androidx.legacy:legacy-support-v4:1.0.0'
api 'androidx.appcompat:appcompat:1.7.0'
api 'androidx.annotation:annotation:1.9.0'
api 'com.google.firebase:firebase-messaging:20.3.0'
implementation 'com.google.code.gson:gson:2.10.1'
implementation "androidx.security:security-crypto:1.1.0-alpha06"
testImplementation 'junit:junit:4.13.2'
testImplementation 'androidx.test:runner:1.6.2'
testImplementation 'androidx.test.espresso:espresso-core:3.6.1'
testImplementation 'androidx.test.ext:junit:1.2.1'
testImplementation 'androidx.test:rules:1.6.1'
testImplementation 'org.mockito:mockito-core:4.8.0'
testImplementation 'org.mockito:mockito-inline:4.8.0'
testImplementation 'org.robolectric:robolectric:4.14.1'
testImplementation 'org.khronos:opengl-api:gl1.1-android-2.1_r1'
testImplementation 'com.squareup.okhttp3:mockwebserver:4.9.3'
testImplementation 'org.skyscreamer:jsonassert:1.5.0'
testImplementation project(':iterableapi')
androidTestImplementation 'androidx.test:runner:1.6.2'
androidTestImplementation 'androidx.test:rules:1.6.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.6.1'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.3.0'
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:4.9.3'
androidTestImplementation 'org.mockito:mockito-android:4.8.0'
}
ext {
libraryName = 'iterableapi'
libraryVersion = '3.6.4'
}
if (hasProperty("mavenPublishEnabled")) {
apply from: '../maven-push.gradle'
}
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
excludes = ['**/*.kt']
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
exclude '**/*.kt'
}
task checkstyle(type: Checkstyle) {
configFile file("${project.rootDir}/checkstyle.xml")
source 'src'
include '**/*.java'
exclude '**/gen/**'
classpath = files()
}
// A hack to import the classpath and BuildConfig into the javadoc task
afterEvaluate {
javadoc.classpath += files(android.libraryVariants.collect { variant -> variant.javaCompile.classpath.files })
javadoc.classpath += files(android.libraryVariants.collect { variant -> "build/generated/source/r/${variant.flavorName}/${variant.buildType.name}" })
javadoc.classpath += files(android.libraryVariants.collect { variant -> "build/generated/source/buildConfig/${variant.flavorName}/${variant.buildType.name}" })
}