-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
128 lines (113 loc) · 3.7 KB
/
build.gradle.kts
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
116
117
118
119
120
121
122
123
124
125
126
127
128
/*
* MUGHome.Utils.Flarum - A Flarum Util for Java/Kotlin
* https://github.com/MUGHomeDev/MUGHome.Utils.Flarum
* Copyright (C) 2021-2022 MUGHome
*
* This Library is free software: you can redistribute it
* and/or modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will
* be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public
* License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program. If not,
* see <https://www.gnu.org/licenses/>.
*
* Please contact us by email [email protected]
* if you need additional information or have any questions
*/
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
java
`java-library`
id("org.jetbrains.dokka") version "1.4.32"
kotlin("jvm") version "1.6.20-RC"
`maven-publish`
application
signing
}
group = "top.mughome.sdk"
version = "0.0.6.4"
repositories {
maven("https://mvn.mughome.top/repository/maven-public/")
mavenCentral()
}
dependencies {
testImplementation(kotlin("test"))
dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.6.10")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0")
implementation("com.alibaba:fastjson:1.2.80")
implementation("com.squareup.okhttp3:okhttp:5.0.0-alpha.6")
implementation("org.apache.directory.studio:org.apache.commons.lang:2.6")
}
tasks.test {
useJUnitPlatform()
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
sourceSets {
main {
java {
include("**/*.java")
include("**/*.kt")
}
}
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
create<MavenPublication>("maven") {
groupId = "top.mughome.sdk"
artifactId = "community"
version = "0.0.6.4"
from(components["java"])
pom {
name.set("MUGHome Community SDK")
description.set("MUGHome Community SDK for Kotlin/Java")
developers {
developer {
id.set("Yang")
name.set("Yang")
email.set("[email protected]")
}
developer {
id.set("siscon")
name.set("siscon")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:git://github.com/MUGHomeDev/SDK.Community.git")
developerConnection.set("scm:git:ssh://[email protected]:MUGHomeDev/SDK.Community.git")
url.set("https://github.com/MUGHomeDev/SDK.Community")
}
}
}
}
repositories {
maven {
val releasesRepoUrl = uri("https://mvn.mughome.top/repository/maven-releases/")
val snapshotsRepoUrl = uri("https://mvn.mughome.top/repository/maven-snapshots/")
url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
credentials {
username = properties["repoUser"].toString()
password = properties["repoPassword"].toString()
}
}
}
}
tasks.javadoc {
if (JavaVersion.current().isJava9Compatible) {
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
}
}