forked from nodes-android/kotlin-template
/
build.gradle
77 lines (67 loc) · 2.08 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
import com.lucassales.*
buildscript {
ext.versions = [
'android_gradle': '3.5.0-alpha10',
'paging' : '2.0.0',
'nexus' : '0.9.0',
'kotlin' : '1.3.21',
'rx' : '2.2.3',
'retrofit' : '2.5.0',
'nstack' : '1.0.4',
'lifecycle' : '2.1.0-alpha04'
]
ext.sdks = [
compileSdkVersion: 28,
buildToolsVersion: '28.0.3',
minSdkVersion : 26,
targetSdkVersion : 28
]
repositories {
mavenCentral()
google()
jcenter()
}
dependencies {
classpath Libs.androidGradlePlugin
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:${versions.nexus}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath "dk.nodes.nstack:translation:${versions.nstack}"
classpath "com.github.gfx.ribbonizer:ribbonizer-plugin:2.1.0"
classpath "dk.nodes.ci:bitrise:1.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
}
}
plugins {
id "com.diffplug.gradle.spotless" version "3.21.1"
id 'com.github.ben-manes.versions' version "0.21.0"
}
allprojects {
repositories {
mavenCentral()
maven { url 'https://maven.google.com' }
jcenter()
mavenLocal()
}
}
subprojects {
apply plugin: 'com.diffplug.gradle.spotless'
spotless {
kotlin {
target "**/*.kt"
ktlint('0.31.0')
}
}
}
dependencyUpdates.resolutionStrategy {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm', 'preview'].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
}
if (rejected) {
selection.reject('Release candidate')
}
}
}
}