forked from MarkusAmshove/Kluent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
105 lines (91 loc) · 3.75 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
buildscript {
// TODO: Mockito and will be removed in the future
ext.mockito_version = '1.5.0'
repositories {
jcenter()
mavenCentral()
maven { url "http://kotlin.bintray.com/kotlinx" }
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies" }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.moowork.gradle:gradle-node-plugin:$gradle_node_version"
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:$kotlin_native_gradle_plugin_version"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.+"
classpath 'com.adarshr:gradle-test-logger-plugin:1.6.0'
}
}
ext {
libs = [
// Compile
kotlin_stdlib_common : "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlin_version",
kotlin_stdlib_jvm : "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version",
kotlin_stdlib_js : "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version",
kotlin_reflect : "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version",
// Tests
kotlin_test_common : "org.jetbrains.kotlin:kotlin-test-common:$kotlin_version",
kotlin_test_jvm : "org.jetbrains.kotlin:kotlin-test:$kotlin_version",
kotlin_test_junit : "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version",
kotlin_test_js : "org.jetbrains.kotlin:kotlin-test-js:$kotlin_version",
kotlin_test_annotations : "org.jetbrains.kotlin:kotlin-test-annotations-common:$kotlin_version",
kotlinx_coroutines_test : "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinx_coroutines_version",
junit : "junit:junit:4.12",
]
}
allprojects {
group 'org.amshove.kluent'
version '1.57'
apply plugin: 'com.adarshr.test-logger'
repositories {
jcenter()
mavenCentral()
maven { url "http://kotlin.bintray.com/kotlinx" }
}
}
subprojects {
ext.configurePublishing = { artifactName = null ->
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
apply plugin: 'java'
artifactName = artifactName ?: project.name
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayKey') ? project.property('bintrayKey') : System.getenv('BINTRAY_KEY')
publish = true
override = true
publications = ['Publication']
configurations = ['archives']
pkg {
repo = 'maven'
name = artifactName
licenses = ['MIT']
vcsUrl = 'https://github.com/MarkusAmshove/Kluent'
}
publishing {
publications {
Publication(MavenPublication) {
from components.java
groupId 'org.amshove.kluent'
artifactId artifactName
version project.version
artifact sourcesJar
}
}
}
}
task printArtifactName {
doLast {
logger.info("artifactName: $artifactName")
}
}
bintrayUpload.dependsOn(printArtifactName)
}
}