forked from markusamshove/Kluent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
112 lines (98 loc) · 2.91 KB
/
build.gradle
File metadata and controls
112 lines (98 loc) · 2.91 KB
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
buildscript {
ext.kotlin_version = '1.1.+'
ext.spek_version = "1.0.+"
ext.mockito_version = "1.5.+"
repositories {
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
}
}
group 'org.amshove.kluent'
version '1.31'
apply plugin: 'kotlin'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
def isAndroid = project.rootProject.hasProperty("ANDROID")
if(isAndroid) {
logger.warn("Android build!")
}
archivesBaseName = isAndroid ? "kluent-android" : "kluent"
repositories {
jcenter()
mavenCentral()
maven {
url = 'http://repository.jetbrains.com/all'
}
}
dependencies {
implementation 'junit:junit:4.12'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "com.nhaarman:mockito-kotlin-kt1.1:$mockito_version"
testImplementation 'junit:junit:4.12'
testImplementation "org.jetbrains.spek:spek:$spek_version"
testImplementation "com.nhaarman:mockito-kotlin-kt1.1:$mockito_version"
}
sourceSets {
main {
kotlin {
srcDirs += 'src/main/kotlin'
if(isAndroid) {
exclude '**/*Backtick.kt'
}
}
}
test {
kotlin {
srcDirs += 'src/test/kotlin'
if(isAndroid) {
exclude '**/backtick*/**'
}
}
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
bintrayUpload.dependsOn install
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publications = ['PublishKluent']
configurations = ['archives']
pkg {
repo = "maven"
name = isAndroid ? "Kluent-Android" : "Kluent"
licenses = ['MIT']
vcsUrl = 'https://github.com/MarkusAmshove/Kluent'
}
}
publishing {
publications {
PublishKluent(MavenPublication) {
from components.java
artifact sourcesJar
groupId 'org.amshove.kluent'
artifactId isAndroid ? 'kluent-android' : 'kluent'
version project.version
pom.withXml {
configurations.compile.allDependencies.each {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
}