-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patholdbuild.txt
93 lines (79 loc) · 2.87 KB
/
oldbuild.txt
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
/*
* © Copyright - Lars Artmann aka. LartyHD 2018.
*/
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.net.URI
plugins {
java
kotlin("jvm") version "1.3.11"
}
allprojects {
apply{
plugin("idea")
}
}
subprojects {
apply {
plugin("java")
plugin("kotlin")
}
group = "net.darkdevelopers.darkbedrock"
version = "1.0-SNAPSHOT"
extra["libsDirName"] = "libraries"
extra["libsDir"] = project.file(extra["libsDirName"].toString())
extra["KotlinDependencies"] = listOf(
"org.jetbrains.kotlin:kotlin-stdlib",
"org.jetbrains.kotlin:kotlin-reflect",
"org.jetbrains.kotlinx:kotlinx-coroutines-core:1.0.1"
)
extra["TestDependencies"] = listOf(
"org.jetbrains.kotlin:kotlin-test",
"org.jetbrains.kotlin:kotlin-test-junit5",
"org.mockito:mockito-all:2.0.2-beta",
"org.junit.jupiter:junit-jupiter-api:5.3.1"
)
extra["compileKotlin"] = fun(p0: DependencyHandlerScope) {
val dependencies = extra["KotlinDependencies"] as List<String>
dependencies.forEach { p0.compile(it) }
}
extra["compileTest"] = fun(p0: DependencyHandlerScope) {
val dependencies = extra["TestDependencies"] as List<String>
dependencies.forEach { p0.testCompile(it) }
}
// extra["buildID"] = fun() = Properties().run {
// val file = File(projectDir, "build.properties")
// file.createNewFile()
// load(FileInputStream(file))
// val id = (getProperty("build")?.toIntOrNull() ?: 0) + 1
// this["build"] = id.toString()
// store(FileOutputStream(file), null)
// id
// }
// this.java.sourceSets["main"].java.srcDirs("src/main/kotlin")
// sourceSets["test"].java.srcDirs("src/test/kotlin")
repositories {
//mavenLocal()
mavenCentral()
jcenter()
google()
maven { url = URI("http://nexus.hc.to/content/repositories/pub_releases/") }
maven { url = URI("https://hub.spigotmc.org/nexus/content/groups/public/") }
maven { url = URI("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") }
maven { url = URI("https://oss.sonatype.org/content/groups/public/") }
maven { url = URI("https://oss.sonatype.org/content/repositories/snapshots/") }
maven { url = URI("http://repo.dmulloy2.net/content/groups/public/") }
maven { url = URI("https://repo.velocitypowered.com/snapshots/") }
maven { url = URI("http://repo.spongepowered.org/maven") }
}
dependencies {
compile(fileTree(extra["libsDirName"].toString()))
}
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.suppressWarnings = true
}
}