-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathbuild.gradle
121 lines (101 loc) · 3.66 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
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
plugins {
id "com.android.library"
id "maven-publish"
id "pmd"
id "jacoco"
id "checkstyle"
id "com.github.spotbugs" version "5.2.3"
id "org.owasp.dependencycheck" version "7.1.1"
id "org.sonarqube" version "3.4.0.2513"
}
ext {
maxAarSizeKb = 200
}
android {
compileSdk 34
namespace 'com.hcaptcha.sdk'
buildFeatures {
buildConfig true
}
defaultConfig {
minSdkVersion 16
targetSdkVersion 34
// See https://developer.android.com/studio/publish/versioning
// versionCode must be integer and be incremented by one for every new update
// android system uses this to prevent downgrades
versionCode 42
// version number visible to the user
// should follow semantic versioning (See https://semver.org)
versionName "4.0.3"
buildConfigField 'String', 'VERSION_NAME', "\"${defaultConfig.versionName}_${defaultConfig.versionCode}\""
consumerProguardFiles "consumer-rules.pro"
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
compileOptions {
// Sets Java compatibility to Java 8
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
minifyEnabled true
}
}
testOptions {
unitTests {
returnDefaultValues = true
includeAndroidResources = true
}
}
publishing {
singleVariant('release') {
withSourcesJar()
withJavadocJar()
}
}
}
dependencies {
//noinspection GradleDependency
implementation 'androidx.appcompat:appcompat:1.3.1'
//noinspection GradleDependency
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.5' // max version https://github.com/FasterXML/jackson-databind/issues/3657
compileOnly 'org.projectlombok:lombok:1.18.32'
annotationProcessor 'org.projectlombok:lombok:1.18.32'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-inline:4.8.1'
testImplementation 'org.skyscreamer:jsonassert:1.5.1'
compileOnly 'com.google.code.findbugs:annotations:3.0.1'
}
project.afterEvaluate {
publishing {
repositories {
}
publications {
release(MavenPublication) {
from components.release
groupId = 'com.hcaptcha'
artifactId = 'sdk'
version = android.defaultConfig.versionName
pom {
name = 'Android SDK hCaptcha'
description = 'This SDK provides a wrapper for hCaptcha and is a drop-in replacement for the SafetyNet reCAPTCHA API.'
url = 'https://github.com/hCaptcha/hcaptcha-android-sdk'
licenses {
license {
name = 'MIT License'
url = 'https://github.com/hCaptcha/hcaptcha-android-sdk/blob/main/LICENSE'
}
}
scm {
connection = 'scm:git:git://github.com/hCaptcha/hcaptcha-android-sdk.git'
developerConnection = 'scm:git:ssh://github.com:hCaptcha/hcaptcha-android-sdk.git'
url = 'https://github.com/hCaptcha/hcaptcha-android-sdk'
}
}
}
}
}
}
apply from: "$rootProject.projectDir/gradle/shared/code-quality.gradle"
apply from: "$rootProject.projectDir/gradle/shared/size-check.gradle"
apply from: "$rootProject.projectDir/gradle/shared/html-java-gen.gradle"