This repository has been archived by the owner on Nov 12, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
76 lines (60 loc) · 1.65 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
apply plugin: 'kotlin'
// Setup
// Project
group 'net.ehvazend.mpu'
version 'Dev'
// Kotlin JVM Target
def jvmTarget = "1.8"
// Main class
def mainClass = 'net.ehvazend.builder.Main'
// Version of lib
def kotlin = '1.2.21'
def junitJupiter = '5.0.0'
def config = '1.3.3'
def jsoup = '1.10.3'
buildscript {
ext.kotlin = '1.2.21'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin"
}
}
repositories {
mavenCentral()
}
dependencies {
// Kotlin runtime and reflect
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin"
// compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin"
// JUnit Jupiter API and TestEngine implementation
testCompile "org.junit.jupiter:junit-jupiter-api:$junitJupiter"
testRuntime "org.junit.jupiter:junit-jupiter-engine:$junitJupiter"
// Other libs
compile "com.typesafe:config:$config"
compile "org.jsoup:jsoup:$jsoup"
compile files ("../GraphicsMPU/build/libs/GraphicsMPU-1.0.jar")
}
compileKotlin {
kotlinOptions.jvmTarget = jvmTarget
}
compileTestKotlin {
kotlinOptions.jvmTarget = jvmTarget
}
jar {
manifest {
attributes 'Main-Class': mainClass
}
from {
String[] include = [
"kotlin-runtime-${kotlin}.jar",
"kotlin-stdlib-${kotlin}.jar",
// "kotlin-reflect-${kotlin}.jar"
"GraphicsMPU-Dev.jar"
]
configurations.compile
.findAll { include.contains(it.name) }
.collect { it.isDirectory() ? it : zipTree(it) }
}
}