-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
106 lines (89 loc) · 2.47 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
buildscript {
ext.kotlin_version = '1.4.32'
repositories {
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}
repositories {
mavenCentral()
google()
maven { url 'https://jitpack.io' }
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.github.dcendents.android-maven'
group = 'com.github.ridi'
version = '1.5.9'
android {
compileSdkVersion 29
buildToolsVersion '29.0.3'
defaultConfig {
minSdkVersion 16
versionCode 1
versionName version
consumerProguardFiles 'proguard-rules.pro'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
test.java.srcDirs += 'src/test/kotlin'
}
buildFeatures {
dataBinding = true
}
}
configurations {
ktlint
}
dependencies {
compileOnly 'androidx.fragment:fragment-ktx:1.2.5'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.github.ridi:android-gpuimage:v2.1.1'
// compress 1.13+ requires API 26+ (java.nio.file) in order to use ZipFile
implementation 'org.apache.commons:commons-compress:1.12'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
testImplementation 'junit:junit:4.13'
ktlint 'com.pinterest:ktlint:0.34.2'
ktlint 'com.github.ridi:ktlint-ruleset:master-SNAPSHOT'
}
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
artifacts {
archives sourcesJar
}
task ktlint(type: JavaExec, group: 'verification') {
description = 'Check Kotlin code style.'
classpath = configurations.ktlint
main = 'com.pinterest.ktlint.Main'
args 'src/**/*.kt'
}
afterEvaluate { project ->
check.dependsOn ktlint
}
task ktlintFormat(type: JavaExec, group: 'formatting') {
description = 'Fix Kotlin code style deviations.'
classpath = configurations.ktlint
main = 'com.pinterest.ktlint.Main'
args '-F', 'src/**/*.kt'
}
install {
repositories.mavenInstaller {
pom.project {
licenses {
license {
name 'The MIT License'
url 'https://opensource.org/licenses/MIT'
distribution 'repo'
}
}
}
}
}