Skip to content

Commit 4e9cd1e

Browse files
Update build.gradle.kts and .gitignore
1 parent c54c59b commit 4e9cd1e

2 files changed

Lines changed: 77 additions & 83 deletions

File tree

.gitignore

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,40 @@
11
# Gradle
22
.gradle/
33
build/
4-
!gradle/wrapper/gradle-wrapper.jar
5-
gradle.properties
6-
7-
main.kt
4+
gradle-app.setting
5+
!gradle-wrapper.jar
6+
.gradletasknamecache
87

9-
local.properties
10-
11-
# IntelliJ
8+
# IntelliJ IDEA
129
.idea/
1310
*.iml
14-
*.ipr
1511
*.iws
12+
*.ipr
13+
out/
1614

1715
# Eclipse
1816
.classpath
1917
.project
2018
.settings/
21-
22-
# Maven
23-
target/
24-
25-
# Kotlin
26-
.kotlin/
27-
captures/
28-
29-
# Binaries
3019
bin/
31-
out/
32-
33-
# Secrets
34-
secring.gpg
35-
signing.gpg
36-
*.jks
3720

38-
# Log files
39-
*.log
21+
# VS Code
22+
.vscode/
4023

41-
# OS-specific
24+
# macOS
4225
.DS_Store
26+
27+
# Windows
4328
Thumbs.db
4429

45-
# Temporary files
46-
*~
47-
*.swp
48-
*.swo
30+
# Sensitive files
31+
gradle.properties
32+
local.properties
33+
signing.gpg
34+
*.gpg
35+
*.asc
36+
secret.key
4937

50-
# Dokka Docs
51-
docs/
38+
# Generated files
39+
/docs/
40+
manual/

build.gradle.kts

Lines changed: 56 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import org.gradle.api.publish.maven.tasks.AbstractPublishToMaven
12
import org.jetbrains.dokka.gradle.DokkaTaskPartial
23
import org.jetbrains.dokka.gradle.tasks.DokkaGeneratePublicationTask
34
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
@@ -24,8 +25,54 @@ repositories {
2425
}
2526

2627
mavenPublishing {
27-
publishToMavenCentral()
28+
// Central Portal 사용 (OSSRH가 아닌)
29+
publishToMavenCentral(automaticRelease = false)
30+
31+
// GPG 서명 활성화 (선택사항이지만 권장)
2832
signAllPublications()
33+
34+
// 아티팩트 좌표 및 POM 메타데이터 설정
35+
coordinates(group.toString(), "sdk", version.toString())
36+
37+
pom {
38+
name.set("SOLAPI SDK")
39+
description.set("SOLAPI 및 SOLAPI 계열(쿨에스엠에스 등) 서비스에서 사용되는 문자 발송용 SDK")
40+
url.set("https://github.com/solapi/solapi-kotlin")
41+
42+
licenses {
43+
license {
44+
name.set("MIT License")
45+
url.set("https://opensource.org/license/MIT")
46+
}
47+
}
48+
49+
developers {
50+
developer {
51+
id.set("contact")
52+
name.set("SOLAPI Contact")
53+
email.set("contact@solapi.com")
54+
organization.set("SOLAPI Inc")
55+
}
56+
developer {
57+
id.set("lucy")
58+
name.set("Lucy Lee")
59+
email.set("lucy@solapi.com")
60+
organization.set("SOLAPI Inc")
61+
}
62+
developer {
63+
id.set("hosy")
64+
name.set("Hosy Lee")
65+
email.set("hosy@solapi.com")
66+
organization.set("SOLAPI Inc")
67+
}
68+
}
69+
70+
scm {
71+
connection.set("scm:git:git://github.com/solapi/solapi-kotlin.git")
72+
developerConnection.set("scm:git:ssh://github.com/solapi/solapi-kotlin.git")
73+
url.set("https://github.com/solapi/solapi-kotlin")
74+
}
75+
}
2976
}
3077

3178
dependencies {
@@ -67,7 +114,7 @@ tasks.withType<KotlinCompile>().configureEach {
67114
}
68115

69116
java {
70-
withJavadocJar()
117+
// Dokka가 javadocJar를 제공하므로 withJavadocJar() 제거
71118
withSourcesJar()
72119
}
73120

@@ -122,54 +169,12 @@ tasks.withType<DokkaGeneratePublicationTask>().configureEach {
122169
outputDirectory.set(project.rootDir.resolve("docs"))
123170
}
124171

125-
publishing {
126-
publications {
127-
create<MavenPublication>("mavenJava") {
128-
groupId = group.toString()
129-
artifactId = "sdk"
130-
version = version
131-
132-
from(components["shadow"])
133-
134-
artifact(tasks.named("sourcesJar"))
135-
artifact(tasks.named("javadocJar"))
136-
137-
pom {
138-
name.set("SOLAPI SDK")
139-
description.set("SOLAPI 및 SOLAPI 계열(쿨에스엠에스 등) 서비스에서 사용되는 문자 발송용 SDK")
140-
url.set("https://github.com/nurigo/java-sdk")
141-
licenses {
142-
license {
143-
name.set("MIT License")
144-
url.set("https://opensource.org/license/MIT")
145-
}
146-
}
147-
developers {
148-
developer {
149-
name.set("SOLAPI Contact")
150-
email.set("contact@SOLAPI.com")
151-
organization.set("SOLAPI Inc")
152-
}
153-
developer {
154-
name.set("Lucy Lee")
155-
email.set("lucy@solapi.com")
156-
organization.set("SOLAPI Inc")
157-
}
158-
developer {
159-
id.set("hosy")
160-
name.set("Hosy Lee")
161-
email.set("hosy@solapi.com")
162-
organization.set("SOLAPI Inc")
163-
}
164-
}
165-
scm {
166-
connection.set("scm:git:git://github.com/solapi/solapi-kotlin.git")
167-
developerConnection.set("scm:git:ssh://github.com/solapi/solapi-kotlin.git")
168-
url.set("https://github.com/solapi/solapi-kotlin")
169-
}
170-
}
171-
}
172-
}
172+
// Publishing 관련 태스크들이 dokkaJavadocJar에 의존하도록 설정
173+
tasks.withType<AbstractPublishToMaven>().configureEach {
174+
dependsOn("dokkaJavadocJar")
173175
}
174176

175-
177+
// 메타데이터 생성 태스크가 dokkaJavadocJar에 의존하도록 설정
178+
afterEvaluate {
179+
tasks.findByName("generateMetadataFileForMavenPublication")?.dependsOn("dokkaJavadocJar")
180+
}

0 commit comments

Comments
 (0)