-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
124 lines (107 loc) · 3.26 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
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
plugins {
id 'org.jetbrains.kotlin.jvm' version '2.0.20'
id 'maven-publish'
id 'java'
// Dokka 플러그인 추가
id 'org.jetbrains.dokka' version '1.9.10'
}
group = 'me.hellosunghyun'
version = '0.4-SNAPSHOT'
repositories {
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withJavadocJar()
}
javadoc {
// 생성된 JavaDocs의 encoding 설정
options.encoding = 'UTF-8'
// 링크 추가 예시 (외부 JDK 문서 링크)
options.links('https://docs.oracle.com/javase/8/docs/api/')
}
kotlin {
jvmToolchain(17)
}
dependencies {
testImplementation 'org.jetbrains.kotlin:kotlin-test'
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0")
implementation("com.google.code.gson:gson:2.11.0")
// Dokka 의존성 추가
dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.9.10")
}
// Dokka 태스크 설정
tasks.dokkaHtml.configure {
outputDirectory.set(layout.buildDirectory.dir("dokka"))
moduleName.set("SoopChatSDK")
dokkaSourceSets {
named("main") {
includeNonPublic.set(false)
skipEmptyPackages.set(true)
reportUndocumented.set(true)
jdkVersion.set(17)
}
}
}
// Javadoc 태스크를 Dokka HTML로 대체
tasks.named('javadoc') {
dependsOn(tasks.dokkaHtml)
}
// Javadoc JAR 태스크 수정
tasks.named('javadocJar', Jar) {
dependsOn(tasks.dokkaHtml)
from(tasks.dokkaHtml)
archiveClassifier.set('javadoc')
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/hellosunghyun/SoopChatSDK")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
publications {
create("gpr", MavenPublication) {
from(components["java"])
groupId = 'me.hellosunghyun'
artifactId = 'soopchatsdk'
version = '0.4-SNAPSHOT'
pom {
name.set('SoopChatSDK')
description.set('Description of your project.')
url.set('https://github.com/hellosunghyun/SoopChatSDK')
licenses {
license {
name.set('The Apache License, Version 2.0')
url.set('http://www.apache.org/licenses/LICENSE-2.0.txt')
}
}
developers {
developer {
id.set('hellosunghyun')
name.set('Your Name')
email.set('[email protected]')
}
}
scm {
connection.set('scm:git:git://github.com/hellosunghyun/SoopChatSDK.git')
developerConnection.set('scm:git:ssh://github.com/hellosunghyun/SoopChatSDK.git')
url.set('https://github.com/hellosunghyun/SoopChatSDK')
}
}
}
}
}
test {
useJUnitPlatform()
}
tasks.withType(Javadoc) {
// 도큐먼트에 표시되는 문자열 설정
options.author = true
options.version = true
}