Skip to content

Commit e7aaab2

Browse files
authored
Merge pull request #2 from HawkDiscord/feature/docs
1.1.0-SNAPSHOT
2 parents f0c0284 + cce66e4 commit e7aaab2

289 files changed

Lines changed: 11909 additions & 40 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

command/build.gradle.kts

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
import com.jfrog.bintray.gradle.BintrayExtension
2+
import groovy.lang.GroovyObject
3+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
4+
import org.jfrog.gradle.plugin.artifactory.dsl.PublisherConfig
5+
import org.jfrog.gradle.plugin.artifactory.dsl.ResolverConfig
6+
7+
plugins {
8+
id("org.jetbrains.dokka") version "0.9.18"
9+
id("com.jfrog.bintray") version "1.8.4"
10+
id("com.jfrog.artifactory") version "4.9.6"
11+
kotlin("jvm") version "1.3.11"
12+
`maven-publish`
13+
java
14+
}
15+
16+
group = "me.schlaubi.regnumutils"
17+
version = "1.0.0-SNAPSHOT"
18+
19+
repositories {
20+
mavenCentral()
21+
jcenter()
22+
}
23+
24+
dependencies {
25+
26+
compile(project(":common"))
27+
28+
}
29+
30+
val sourcesJar by tasks.creating(Jar::class)
31+
val dokkaJar by tasks.creating(Jar::class)
32+
33+
bintray {
34+
user = System.getenv("BINTRAY_USER")
35+
key = System.getenv("BINTRAY_KEY")
36+
pkg(delegateClosureOf<BintrayExtension.PackageConfig> {
37+
repo = "maven"
38+
name = "regnum-utils-command"
39+
userOrg = "hawk"
40+
setLicenses("GPL-3.0")
41+
vcsUrl = "https://github.com/HawkDiscord/regnum-utils.git"
42+
version(delegateClosureOf<BintrayExtension.VersionConfig> {
43+
name = project.version as String
44+
})
45+
})
46+
}
47+
48+
artifactory {
49+
setContextUrl("https://oss.jfrog.org/artifactory")
50+
publish(delegateClosureOf<PublisherConfig> {
51+
repository(delegateClosureOf<GroovyObject> {
52+
setProperty("repoKey", "oss-snapshot-local")
53+
setProperty("username", System.getenv("BINTRAY_USER"))
54+
setProperty("password", System.getenv("BINTRAY_KEY"))
55+
setProperty("maven", true)
56+
})
57+
defaults(delegateClosureOf<GroovyObject> {
58+
invokeMethod("publications", "mavenJava")
59+
})
60+
})
61+
resolve(delegateClosureOf<ResolverConfig> {
62+
setProperty("repoKey", "repo")
63+
})
64+
}
65+
66+
publishing {
67+
publications {
68+
create<MavenPublication>("mavenJava") {
69+
from(components["java"])
70+
artifact(sourcesJar)
71+
artifact(dokkaJar)
72+
groupId = project.group as String
73+
artifactId = project.name
74+
version = project.version as String
75+
}
76+
}
77+
}
78+
79+
tasks {
80+
dokka {
81+
moduleName = "common"
82+
outputDirectory = "${project.parent!!.projectDir}/docs"
83+
// Oracle broke it
84+
noJdkLink = true
85+
reportUndocumented = true
86+
impliedPlatforms = mutableListOf("JVM")
87+
linkMapping {
88+
dir = "./"
89+
url = "https://github.com/HawkDiscord/regnum-utils/tree/master"
90+
suffix = "#L"
91+
}
92+
externalDocumentationLink {
93+
url = uri("https://www.slf4j.org/api/").toURL()
94+
}
95+
externalDocumentationLink {
96+
url = uri("http://fasterxml.github.io/jackson-databind/javadoc/2.9/").toURL()
97+
}
98+
externalDocumentationLink {
99+
url = uri("https://pages.hawkbot.cc/shared/").toURL()
100+
}
101+
externalDocumentationLink {
102+
url = uri("https://pages.hawkbot.cc/client/").toURL()
103+
}
104+
externalDocumentationLink {
105+
url = uri("https://ci.dv8tion.net/job/JDA4-Alpha/javadoc/").toURL()
106+
packageListUrl =
107+
uri("https://gist.githubusercontent.com/DRSchlaubi/3d1d0aaa5c01963dcd4d0149c841c896/raw/22141759fbab1e38fd2381c3e4f97616ecb43fc8/package-list").toURL()
108+
}
109+
}
110+
111+
"sourcesJar"(Jar::class) {
112+
archiveClassifier.set("sources")
113+
from(sourceSets["main"].allSource)
114+
}
115+
"dokkaJar"(Jar::class) {
116+
group = JavaBasePlugin.DOCUMENTATION_GROUP
117+
archiveClassifier.set("javadoc")
118+
from(dokka)
119+
}
120+
}
121+
122+
123+
configure<JavaPluginConvention> {
124+
sourceCompatibility = JavaVersion.VERSION_12
125+
}
126+
tasks.withType<KotlinCompile> {
127+
kotlinOptions.jvmTarget = "1.8"
128+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Regnum - A Discord bot clustering system made for Hawk
3+
*
4+
* Copyright (C) 2019 Michael Rittmeister
5+
*
6+
* This program is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU General Public License
17+
* along with this program. If not, see https://www.gnu.org/licenses/.
18+
*/
19+
20+
package me.schlaubi.regnumutils.command
21+
22+
interface CommandClient {
23+
}

common/build.gradle.kts

Lines changed: 104 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,133 @@
1+
import com.jfrog.bintray.gradle.BintrayExtension
2+
import groovy.lang.GroovyObject
13
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
4+
import org.jfrog.gradle.plugin.artifactory.dsl.PublisherConfig
5+
import org.jfrog.gradle.plugin.artifactory.dsl.ResolverConfig
26

37
plugins {
4-
java
8+
id("org.jetbrains.dokka") version "0.9.18"
9+
id("com.jfrog.bintray") version "1.8.4"
10+
id("com.jfrog.artifactory") version "4.9.6"
511
kotlin("jvm") version "1.3.11"
12+
`maven-publish`
13+
java
614
}
715

816
group = "me.schlaubi.regnumutils"
9-
version = "1.0-SNAPSHOT"
17+
version = "1.1.0-SNAPSHOT"
1018

1119
repositories {
1220
mavenCentral()
1321
jcenter()
1422
}
1523

1624
dependencies {
17-
compile ("net.dv8tion:JDA:4.ALPHA.0_103") {
25+
compile("net.dv8tion:JDA:4.ALPHA.0_103") {
1826
exclude(module = "opus-java")
1927
}
2028

2129
compile("cc.hawkbot.regnum", "client", "1.0.0")
2230

2331
compile(kotlin("stdlib-jdk8"))
24-
32+
2533
//Tests
2634
testCompile("org.slf4j", "slf4j-simple", "1.7.26")
2735
testCompile("junit", "junit", "4.12")
2836
testCompile("org.mockito:mockito-core:2.28.2")
2937
}
3038

39+
val sourcesJar by tasks.creating(Jar::class)
40+
val dokkaJar by tasks.creating(Jar::class)
41+
42+
bintray {
43+
user = System.getenv("BINTRAY_USER")
44+
key = System.getenv("BINTRAY_KEY")
45+
pkg(delegateClosureOf<BintrayExtension.PackageConfig> {
46+
repo = "maven"
47+
name = "regnum-utils-common"
48+
userOrg = "hawk"
49+
setLicenses("GPL-3.0")
50+
vcsUrl = "https://github.com/HawkDiscord/regnum-utils.git"
51+
version(delegateClosureOf<BintrayExtension.VersionConfig> {
52+
name = project.version as String
53+
})
54+
})
55+
}
56+
57+
artifactory {
58+
setContextUrl("https://oss.jfrog.org/artifactory")
59+
publish(delegateClosureOf<PublisherConfig> {
60+
repository(delegateClosureOf<GroovyObject> {
61+
setProperty("repoKey", "oss-snapshot-local")
62+
setProperty("username", System.getenv("BINTRAY_USER"))
63+
setProperty("password", System.getenv("BINTRAY_KEY"))
64+
setProperty("maven", true)
65+
})
66+
defaults(delegateClosureOf<GroovyObject> {
67+
invokeMethod("publications", "mavenJava")
68+
})
69+
})
70+
resolve(delegateClosureOf<ResolverConfig> {
71+
setProperty("repoKey", "repo")
72+
})
73+
}
74+
75+
publishing {
76+
publications {
77+
create<MavenPublication>("mavenJava") {
78+
from(components["java"])
79+
artifact(sourcesJar)
80+
artifact(dokkaJar)
81+
groupId = project.group as String
82+
artifactId = project.name
83+
version = project.version as String
84+
}
85+
}
86+
}
87+
88+
tasks {
89+
dokka {
90+
moduleName = "common"
91+
outputDirectory = "${project.parent!!.projectDir}/docs"
92+
// Oracle broke it
93+
noJdkLink = true
94+
reportUndocumented = true
95+
impliedPlatforms = mutableListOf("JVM")
96+
linkMapping {
97+
dir = "./"
98+
url = "https://github.com/HawkDiscord/regnum-utils/tree/master"
99+
suffix = "#L"
100+
}
101+
externalDocumentationLink {
102+
url = uri("https://www.slf4j.org/api/").toURL()
103+
}
104+
externalDocumentationLink {
105+
url = uri("http://fasterxml.github.io/jackson-databind/javadoc/2.9/").toURL()
106+
}
107+
externalDocumentationLink {
108+
url = uri("https://pages.hawkbot.cc/shared/").toURL()
109+
}
110+
externalDocumentationLink {
111+
url = uri("https://pages.hawkbot.cc/client/").toURL()
112+
}
113+
externalDocumentationLink {
114+
url = uri("https://ci.dv8tion.net/job/JDA4-Alpha/javadoc/").toURL()
115+
packageListUrl =
116+
uri("https://gist.githubusercontent.com/DRSchlaubi/3d1d0aaa5c01963dcd4d0149c841c896/raw/22141759fbab1e38fd2381c3e4f97616ecb43fc8/package-list").toURL()
117+
}
118+
}
119+
120+
"sourcesJar"(Jar::class) {
121+
archiveClassifier.set("sources")
122+
from(sourceSets["main"].allSource)
123+
}
124+
"dokkaJar"(Jar::class) {
125+
group = JavaBasePlugin.DOCUMENTATION_GROUP
126+
archiveClassifier.set("javadoc")
127+
from(dokka)
128+
}
129+
}
130+
31131
configure<JavaPluginConvention> {
32132
sourceCompatibility = JavaVersion.VERSION_12
33133
}

0 commit comments

Comments
 (0)