/
build.gradle
104 lines (81 loc) · 2.26 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
group 'org.frice'
version '1.7.10'
buildscript {
ext.kotlin_version = '1.2.0'
ext.dokka_version = '0.9.15'
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version"
}
}
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'org.jetbrains.dokka'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
flatDir { dirs 'lib' }
}
sourceSets {
main.kotlin.srcDirs += 'src'
main.java.srcDirs += 'src'
main.resources.srcDirs += 'res'
test.kotlin.srcDirs += 'test'
test.java.srcDirs += 'test'
}
configurations { library }
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
compile group: 'org.jetbrains', name: 'annotations', version: '15.0'
library name: 'jl1.0.1'
library name: 'mp3spi1.9.5'
library name: 'tritonus_share'
configurations.compile.extendsFrom(configurations.library)
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
}
//noinspection GroovyAssignabilityCheck
tasks.withType(JavaCompile) { options.encoding = 'UTF-8' }
jar { from { configurations.library.collect { it.isDirectory() ? it : zipTree(it) } } }
task fatJar(type: Jar) {
classifier = 'all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
dokka {
includes = ['LICENSE', 'README.md']
// samples = ['test/org/frice/Test.kt', 'test/org/frice/JfxTest.kt']
impliedPlatforms = ['JVM']
jdkVersion = 8
skipDeprecated = false
reportNotDocumented = true
noStdlibLink = false
linkMapping {
dir = 'src'
url = 'https://github.com/icela/FriceEngine/blob/master/src'
suffix = '#L'
}
externalDocumentationLink { url = new URL("https://icela.github.io/") }
}
task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
outputFormat = 'html'
outputDirectory = javadoc.destinationDir
}
task javadok(type: Jar, dependsOn: dokkaJavadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives fatJar
archives sourcesJar
archives javadok
}