Skip to content

Commit 8b1e5c2

Browse files
authored
Merge pull request #4 from HawkDiscord/feature/docs
Feature/docs
2 parents f8767db + 9bf0ea6 commit 8b1e5c2

376 files changed

Lines changed: 6177 additions & 5903 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: 134 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -1,137 +1,135 @@
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-
//Tests
29-
testCompile("org.slf4j", "slf4j-simple", "1.7.26")
30-
testCompile("junit", "junit", "4.12")
31-
testCompile("org.mockito:mockito-core:2.28.2")
32-
33-
}
34-
35-
val sourcesJar by tasks.creating(Jar::class)
36-
val dokkaJar by tasks.creating(Jar::class)
37-
38-
bintray {
39-
user = System.getenv("BINTRAY_USER")
40-
key = System.getenv("BINTRAY_KEY")
41-
pkg(delegateClosureOf<BintrayExtension.PackageConfig> {
42-
repo = "maven"
43-
name = "regnum-utils-command"
44-
userOrg = "hawk"
45-
setLicenses("GPL-3.0")
46-
vcsUrl = "https://github.com/HawkDiscord/regnum-utils.git"
47-
version(delegateClosureOf<BintrayExtension.VersionConfig> {
48-
name = project.version as String
49-
})
50-
})
51-
}
52-
53-
artifactory {
54-
setContextUrl("https://oss.jfrog.org/artifactory")
55-
publish(delegateClosureOf<PublisherConfig> {
56-
repository(delegateClosureOf<GroovyObject> {
57-
setProperty("repoKey", "oss-snapshot-local")
58-
setProperty("username", System.getenv("BINTRAY_USER"))
59-
setProperty("password", System.getenv("BINTRAY_KEY"))
60-
setProperty("maven", true)
61-
})
62-
defaults(delegateClosureOf<GroovyObject> {
63-
invokeMethod("publications", "mavenJava")
64-
})
65-
})
66-
resolve(delegateClosureOf<ResolverConfig> {
67-
setProperty("repoKey", "repo")
68-
})
69-
}
70-
71-
publishing {
72-
publications {
73-
create<MavenPublication>("mavenJava") {
74-
from(components["java"])
75-
artifact(sourcesJar)
76-
artifact(dokkaJar)
77-
groupId = project.group as String
78-
artifactId = project.name
79-
version = project.version as String
80-
}
81-
}
82-
}
83-
84-
tasks {
85-
dokka {
86-
moduleName = "common"
87-
outputDirectory = "${project.parent!!.projectDir}/docs"
88-
// Oracle broke it
89-
noJdkLink = true
90-
reportUndocumented = true
91-
impliedPlatforms = mutableListOf("JVM")
92-
sourceDirs = files("src/main/kotlin", "src/main/java")
93-
sourceDirs.forEach {
94-
val relativePath = rootDir.toPath().relativize(it.toPath()).toString()
95-
linkMapping {
96-
dir = it.absolutePath
97-
url = "https://github.com/HawkDiscord/regnum-utils/tree/master/$relativePath"
98-
suffix = "#L"
99-
}
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-
131-
132-
configure<JavaPluginConvention> {
133-
sourceCompatibility = JavaVersion.VERSION_12
134-
}
135-
tasks.withType<KotlinCompile> {
136-
kotlinOptions.jvmTarget = "1.8"
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.1.0-SNAPSHOT"
18+
19+
repositories {
20+
mavenCentral()
21+
jcenter()
22+
}
23+
24+
dependencies {
25+
26+
compile(project(":common"))
27+
28+
compile(kotlin("stdlib-jdk8"))
29+
30+
//Tests
31+
testCompile("org.slf4j", "slf4j-simple", "1.7.26")
32+
testCompile("junit", "junit", "4.12")
33+
testCompile("org.mockito:mockito-core:2.28.2")
34+
35+
}
36+
37+
val sourcesJar by tasks.creating(Jar::class)
38+
val dokkaJar by tasks.creating(Jar::class)
39+
40+
bintray {
41+
user = System.getenv("BINTRAY_USER")
42+
key = System.getenv("BINTRAY_KEY")
43+
pkg(delegateClosureOf<BintrayExtension.PackageConfig> {
44+
repo = "maven"
45+
name = "regnum-util-command"
46+
userOrg = "hawk"
47+
setLicenses("GPL-3.0")
48+
vcsUrl = "https://github.com/HawkDiscord/regnum-util.git"
49+
version(delegateClosureOf<BintrayExtension.VersionConfig> {
50+
name = project.version as String
51+
})
52+
})
53+
}
54+
55+
artifactory {
56+
setContextUrl("https://oss.jfrog.org/artifactory")
57+
publish(delegateClosureOf<PublisherConfig> {
58+
repository(delegateClosureOf<GroovyObject> {
59+
setProperty("repoKey", "oss-snapshot-local")
60+
setProperty("username", System.getenv("BINTRAY_USER"))
61+
setProperty("password", System.getenv("BINTRAY_KEY"))
62+
setProperty("maven", true)
63+
})
64+
defaults(delegateClosureOf<GroovyObject> {
65+
invokeMethod("publications", "mavenJava")
66+
})
67+
})
68+
resolve(delegateClosureOf<ResolverConfig> {
69+
setProperty("repoKey", "repo")
70+
})
71+
}
72+
73+
publishing {
74+
publications {
75+
create<MavenPublication>("mavenJava") {
76+
from(components["java"])
77+
artifact(sourcesJar)
78+
artifact(dokkaJar)
79+
groupId = project.group as String
80+
artifactId = project.name
81+
version = project.version as String
82+
}
83+
}
84+
}
85+
86+
tasks {
87+
dokka {
88+
moduleName = "common"
89+
outputDirectory = "${project.parent!!.projectDir}/docs"
90+
// Oracle broke it
91+
noJdkLink = true
92+
reportUndocumented = true
93+
impliedPlatforms = mutableListOf("JVM")
94+
linkMapping {
95+
dir = "./"
96+
url = "https://github.com/HawkDiscord/regnum-util/tree/master"
97+
suffix = "#L"
98+
}
99+
externalDocumentationLink {
100+
url = uri("https://www.slf4j.org/api/").toURL()
101+
}
102+
externalDocumentationLink {
103+
url = uri("http://fasterxml.github.io/jackson-databind/javadoc/2.9/").toURL()
104+
}
105+
externalDocumentationLink {
106+
url = uri("https://pages.hawkbot.cc/shared/").toURL()
107+
}
108+
externalDocumentationLink {
109+
url = uri("https://pages.hawkbot.cc/client/").toURL()
110+
}
111+
externalDocumentationLink {
112+
url = uri("https://ci.dv8tion.net/job/JDA4-Alpha/javadoc/").toURL()
113+
packageListUrl =
114+
uri("https://gist.githubusercontent.com/DRSchlaubi/3d1d0aaa5c01963dcd4d0149c841c896/raw/22141759fbab1e38fd2381c3e4f97616ecb43fc8/package-list").toURL()
115+
}
116+
}
117+
118+
"sourcesJar"(Jar::class) {
119+
archiveClassifier.set("sources")
120+
from(sourceSets["main"].allSource)
121+
}
122+
"dokkaJar"(Jar::class) {
123+
group = JavaBasePlugin.DOCUMENTATION_GROUP
124+
archiveClassifier.set("javadoc")
125+
from(dokka)
126+
}
127+
}
128+
129+
130+
configure<JavaPluginConvention> {
131+
sourceCompatibility = JavaVersion.VERSION_12
132+
}
133+
tasks.withType<KotlinCompile> {
134+
kotlinOptions.jvmTarget = "1.8"
137135
}

0 commit comments

Comments
 (0)