-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
101 lines (85 loc) · 2.42 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
buildscript {
ext.kotlin_version = '1.2.41'
repositories {
mavenCentral()
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "gradle.plugin.io.gitlab.arturbosch:detekt-gradle-plugin:latest.release"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.1"
}
}
group 'MicroUtils'
version '1.3'
apply plugin: 'kotlin'
// Apply the java plugin to add support for Java
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'io.gitlab.arturbosch.detekt'
apply plugin: 'com.jfrog.bintray'
sourceCompatibility = 1.6
repositories {
mavenCentral()
jcenter()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
compile 'io.github.microutils:kotlin-logging:1.5.4'
testCompile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'
testCompile 'junit:junit:4.12'
testCompile 'io.kotlintest:kotlintest-runner-junit4:3.1.6'
}
//https://github.com/bintray/gradle-bintray-plugin
bintray {
user = 'oshai'
key = 'my_key' //https://bintray.com/profile/edit
publications = ['MyPublication']
pkg {
repo = 'KotlinMicroUtils'
name = 'KotlinMicroUtils'
userOrg = 'microutils'
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/MicroUtils/KotlinMicroUtils'
version {
name = "$version"
desc = "KotlinMicroUtils $version"
released = new Date()
}
}
}
// custom tasks for creating source/javadoc jars
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
// add javadoc/source jar tasks as artifacts
artifacts {
archives sourcesJar, javadocJar
}
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
groupId 'microutils'
artifactId 'KotlinMicroUtils'
version "$version"
artifact sourcesJar
artifact javadocJar
}
}
}
kotlin {
experimental {
coroutines "enable"
}
}
detektCheck.dependsOn(test)
check.dependsOn(detektCheck)