/
build.gradle
89 lines (74 loc) · 2.76 KB
/
build.gradle
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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.owasp:dependency-check-gradle:9.0.9'
}
}
plugins {
id 'com.android.library'
}
subprojects {
apply plugin: 'org.owasp.dependencycheck'
}
def getVersionCode(semVer) {
def version = semVer.replace("-SNAPSHOT", "").replaceAll("[.]", "").toInteger()
println version
return version
}
android {
namespace = "io.harness.cfsdk"
compileSdkVersion 33
defaultConfig {
minSdkVersion 21
targetSdkVersion 33
versionCode getVersionCode(libs.versions.sdk.get())
versionName libs.versions.sdk.get()
consumerProguardFiles "consumer-rules.pro"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
// Desugaring options allow us to get access to Java 8 APIs that aren't available on our
// minSdkVersion 21, in particular atomic compute functions in ConcurrentHashMap<>
// see https://developer.android.com/studio/write/java8-support#library-desugaring
coreLibraryDesugaringEnabled = true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
buildConfig = false
}
}
apply from: "${rootProject.projectDir}/cfsdk/publish-mavencentral.gradle"
dependencies {
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.3")
implementation 'org.slf4j:slf4j-api:2.0.9'
implementation 'androidx.annotation:annotation:1.7.0'
implementation "com.squareup.okhttp3:okhttp:$okhttp3_version"
implementation "com.squareup.okhttp3:logging-interceptor:$okhttp3_version"
implementation 'io.swagger:swagger-annotations:1.5.24'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'org.threeten:threetenbp:1.6.9'
implementation 'com.orhanobut:hawk:2.0.1'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:4.10.0'
testImplementation "com.squareup.okhttp3:mockwebserver:$okhttp3_version"
testImplementation "com.squareup.okhttp3:okhttp-tls:$okhttp3_version"
testImplementation 'org.json:json:20230227'
testImplementation 'com.google.guava:guava:31.1-android'
testImplementation 'ch.qos.logback:logback-classic:1.2.11'
testImplementation 'com.github.tony19:logback-android:3.0.0'
}
tasks.withType(Javadoc) {
failOnError false // openapi generated code has errors
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
options.addStringOption('charSet', 'UTF-8')
}