This repository has been archived by the owner on May 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
/
build.gradle
115 lines (92 loc) · 2.79 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
group 'tw.geothings.rekotlin'
version '0.1.0-SNAPSHOT'
buildscript {
ext.kotlin_version = '1.1.3-2'
ext.dokka_version = '0.9.15'
ext.junitPlugin_version = '1.0.0'
ext.junit_jupiter_version = '5.0.0-M6'
ext.junit_platform_launcher= "1.0.0-M6"
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:${dokka_version}"
classpath "org.junit.platform:junit-platform-gradle-plugin:${junitPlugin_version}"
}
}
apply plugin: 'kotlin'
apply plugin: 'maven-publish'
apply plugin: 'org.jetbrains.dokka'
apply plugin: 'org.junit.platform.gradle.plugin'
repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
testCompile "org.junit.jupiter:junit-jupiter-api:$junit_jupiter_version"
testRuntime "org.junit.jupiter:junit-jupiter-engine:$junit_jupiter_version"
testRuntime "org.junit.platform:junit-platform-launcher:$junit_platform_launcher"
}
test {
testLogging {
events 'started', 'passed'
}
}
compileKotlin {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
kotlinOptions.jvmTarget = "1.6"
}
compileTestKotlin {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
kotlinOptions.jvmTarget = "1.6"
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
outputFormat = 'javadoc'
outputDirectory = javadoc.destinationDir
inputs.dir 'src/main/kotlin'
}
task javadocJar(type: Jar, dependsOn: dokkaJavadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives jar
archives sourcesJar
archives javadocJar
}
publishing {
publications {
maven(MavenPublication) {
groupId 'tw.geothings.rekotlin'
artifactId 'rekotlin'
from components.java
artifact(javadocJar){
classifier = 'javadoc'
}
artifact(sourcesJar){
classifier = 'sources'
}
repositories {
/*
maven {
url 's3://rekotlin/snapshots'
credentials(AwsCredentials) {
accessKey AWS_ACCESS_KEY // put this in gradle.properties
secretKey AWS_SECRET_KEY // put this in gradle.properties
}
}*/
maven {
url "file:/${project.projectDir}/artifacts"
}
}
}
}
}