blob: de67a6158b4272feed2d0e129abd822470f4731f (
plain)
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
import com.github.spotbugs.snom.SpotBugsTask
repositories {
google()
maven { url "https://jitpack.io" }
mavenCentral()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
apply plugin: 'com.android.library'
apply plugin: "com.github.spotbugs"
apply plugin: "io.gitlab.arturbosch.detekt"
apply plugin: 'maven-publish' // needed for JitPack.io
group = 'com.github.nextcloud'
spotbugs {
toolVersion = '3.1.12'
ignoreFailures = true
}
configurations {
ktlint
}
android {
compileSdkVersion 31
defaultConfig {
minSdkVersion 21
targetSdkVersion 31
versionCode 1
versionName '1.0'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
lintOptions {
// translations are imported from transifex, so no need to check here
disable 'MissingTranslation'
disable 'ExtraTranslation'
disable 'MissingQuantity'
disable 'InconsistentArrays'
disable 'TypographyEllipsis'
disable 'GradleDependency'
disable 'VectorPath'
disable 'IconMissingDensityFolder'
disable 'IconDensities'
abortOnError false
htmlReport true
htmlOutput file("$project.buildDir/reports/lint/lint.html")
}
productFlavors {
}
tasks.register("spotbugsDebugReport", SpotBugsTask) {
ignoreFailures = true
effort = "max"
reportLevel = "medium"
classes = fileTree("$project.buildDir/intermediates/javac/debug/classes/")
excludeFilter = file("${project.rootDir}/spotbugs-filter.xml")
reports {
xml.enabled = false
html {
enabled = true
destination = file("$project.buildDir/reports/spotbugs/spotbugs.html")
}
}
}
}
task ktlint(type: JavaExec, group: "verification") {
description = "Check Kotlin code style."
main = "com.pinterest.ktlint.Main"
classpath = configurations.ktlint
args "--reporter=plain", "--reporter=plain,output=${buildDir}/ktlint.txt,src/**/*.kt"
}
detekt {
reports {
xml {
enabled = false
}
}
config = files("detekt.yml")
input = files("src/")
}
dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
implementation "androidx.appcompat:appcompat:1.4.2"
implementation 'androidx.annotation:annotation:1.5.0'
implementation 'androidx.core:core:1.8.0'
implementation 'androidx.fragment:fragment:1.5.3'
compileOnly "org.projectlombok:lombok:1.18.24"
annotationProcessor "org.projectlombok:lombok:1.18.24"
api 'com.google.code.gson:gson:2.9.1'
implementation 'io.reactivex.rxjava2:rxjava:2.2.21'
implementation 'commons-io:commons-io:2.11.0'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.okhttp3:okhttp:3.14.9'
spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.12.0'
spotbugsPlugins 'com.mebigfatguy.fb-contrib:fb-contrib:7.4.7'
ktlint "com.pinterest:ktlint:0.47.1"
// Required for local unit tests (JUnit 4 framework)
testImplementation 'junit:junit:4.13.2'
// required if you want to use Mockito for unit tests
testImplementation 'org.mockito:mockito-core:4.8.0'
}
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
groupId = 'com.nextcloud.android.sso'
artifactId = 'master'
}
}
}
}
|