This repository has been archived by the owner on Dec 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
73 lines (62 loc) · 1.73 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
buildscript {
ext {
kotlinVersion = "1.3.31"
junitVersion = "5.4.2"
mazegenVersion = "1.1.0"
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
}
}
apply plugin: "kotlin"
apply plugin: "idea"
repositories {
mavenCentral()
jcenter()
maven { url { "https://oss.sonatype.org/content/repositories/snapshots/"}}
}
idea {
module {
outputDir file("build/classes/main")
testOutputDir file("build/classes/test")
}
}
sourceSets.main.java.srcDirs = ["src/main/kotlin"]
sourceSets.test.java.srcDirs = ["src/test/kotlin"]
project.buildDir = "build/"
java {
sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-test:$kotlinVersion"
implementation "org.json:json:20180813"
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
}
task fatJar(type: Jar) {
manifest {
attributes 'Main-Class': 'com.maltaisn.mazegen.MainKt'
}
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
task releaseZip(type: Zip) {
dependsOn fatJar
from(project.rootDir) {
include "mazegen.bat"
include "README.md"
include "CHANGELOG.md"
include "LICENSE"
}
from("build/libs/") {
include "mazegen.jar"
}
archiveName "releases/mazegen-${mazegenVersion}.zip"
destinationDirectory = project.rootDir
}