/
build.gradle
132 lines (111 loc) · 4.34 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
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
buildscript {
repositories {
jcenter()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.github.node-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.13.2",
]
}
allprojects {
group 'org.amshove.kluent'
version '1.69'
apply plugin: 'com.adarshr.test-logger'
repositories {
mavenCentral()
}
}
subprojects {
ext.configurePublishing = { artifactName = null ->
apply plugin: 'maven-publish'
apply plugin: 'java'
apply plugin: 'signing'
artifactName = artifactName ?: project.name
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
java {
withJavadocJar()
withSourcesJar()
}
def isAndroid = project.rootProject.hasProperty("ANDROID")
sourceCompatibility = isAndroid ? 1.6 : 1.8
targetCompatibility = isAndroid ? 1.6 : 1.8
publishing {
repositories {
maven {
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
credentials {
username = findProperty('ossrhUsername')
password = findProperty('ossrhPassword')
}
}
}
publications {
mavenJava(MavenPublication) {
artifactId = artifactName
from components.java
pom {
name = artifactName
packaging 'jar'
description = 'Fluent Assertion-Library for Kotlin'
url = 'https://github.com/MarkusAmshove/Kluent'
scm {
connection = 'scm:git:git:github.com/MarkusAmshove/Kluent.git'
developerConnection = 'scm:git:git:github.com/MarkusAmshove/Kluent.git'
url = 'https://github.com/MarkusAmshove/Kluent'
}
licenses {
license {
name = 'MIT'
url = 'https://github.com/MarkusAmshove/Kluent/blob/master/LICENSE'
}
}
developers {
developer {
id = 'markusamshove'
name = 'Markus Amshove'
}
}
}
}
}
}
signing {
useGpgCmd()
sign publishing.publications.mavenJava
}
task printArtifactName {
doLast {
logger.info("artifactName: $artifactName")
}
}
}
}