-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
150d7a4
commit f5c7768
Showing
6 changed files
with
57 additions
and
149 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Documentation CI | ||
on: | ||
push: | ||
pull_request: | ||
|
||
permissions: | ||
id-token: write | ||
pages: write | ||
|
||
jobs: | ||
docs: | ||
uses: kordlib/.teamcity/.github/workflows/documentation.yml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
import java.util.* | ||
|
||
version = Library.version | ||
group = Library.group | ||
|
||
plugins { | ||
alias(libs.plugins.kotlin.multiplatform) | ||
signing | ||
`maven-publish` | ||
alias(libs.plugins.kord.gradle.plugin) | ||
alias(libs.plugins.maven.publish.plugin) | ||
dev.kord.x.emoji | ||
} | ||
|
||
|
@@ -32,7 +29,7 @@ kotlin { | |
|
||
iosArm64() | ||
iosX64() | ||
iosSimulatorArm64() | ||
iosSimulatorArm64() | ||
|
||
watchosArm64() | ||
watchosSimulatorArm64() | ||
|
@@ -42,73 +39,47 @@ kotlin { | |
tvosSimulatorArm64() | ||
} | ||
|
||
publishing { | ||
publications { | ||
withType<MavenPublication> { | ||
pom { | ||
name = Library.name | ||
description = Library.description | ||
url = Library.description | ||
|
||
organization { | ||
name = "Kord" | ||
url = Library.projectUrl | ||
} | ||
|
||
developers { | ||
developer { | ||
name = "The Kord Team" | ||
} | ||
} | ||
|
||
issueManagement { | ||
system = "GitHub" | ||
url = "${Library.projectUrl}/issues" | ||
} | ||
|
||
licenses { | ||
license { | ||
name = "MIT" | ||
url = "https://opensource.org/licenses/MIT" | ||
} | ||
} | ||
scm { | ||
connection = "scm:git:ssh://github.com/kordlib/kordx.emoji.git" | ||
developerConnection = "scm:git:ssh://[email protected]:kordlib/kord.emoji.git" | ||
url = Library.projectUrl | ||
} | ||
mavenPublishing { | ||
coordinates(artifactId = Library.name) | ||
publishToMavenCentral() | ||
signAllPublications() | ||
|
||
pom { | ||
name = Library.name | ||
description = Library.description | ||
url = Library.description | ||
|
||
organization { | ||
name = "Kord" | ||
url = Library.projectUrl | ||
} | ||
|
||
developers { | ||
developer { | ||
name = "The Kord Team" | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
url = if (Library.isSnapshot) uri(Repo.snapshotsUrl) | ||
else uri(Repo.releasesUrl) | ||
issueManagement { | ||
system = "GitHub" | ||
url = "${Library.projectUrl}/issues" | ||
} | ||
|
||
credentials { | ||
username = System.getenv("NEXUS_USER") | ||
password = System.getenv("NEXUS_PASSWORD") | ||
} | ||
licenses { | ||
license { | ||
name = "MIT" | ||
url = "https://opensource.org/licenses/MIT" | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
val signingKey = findProperty("signingKey")?.toString() | ||
val signingPassword = findProperty("signingPassword")?.toString() | ||
if (signingKey != null && signingPassword != null) { | ||
useInMemoryPgpKeys( | ||
Base64.getDecoder().decode(signingKey).decodeToString(), | ||
signingPassword | ||
) | ||
|
||
publishing.publications.withType<MavenPublication> { | ||
sign(this) | ||
scm { | ||
connection = "scm:git:ssh://github.com/kordlib/kordx.emoji.git" | ||
developerConnection = "scm:git:ssh://[email protected]:kordlib/kord.emoji.git" | ||
url = Library.projectUrl | ||
} | ||
} | ||
} | ||
|
||
|
||
dependencies { | ||
commonMainImplementation(libs.kord.core) { | ||
exclude(module = "kord-ksp-annotations") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,6 @@ | ||
object Library { | ||
const val name = "emoji" | ||
const val group = "dev.kord.x" | ||
val version: String | ||
get() { | ||
val tag = System.getenv("GITHUB_TAG_NAME") | ||
val branch = System.getenv("GITHUB_BRANCH_NAME") | ||
return when { | ||
!tag.isNullOrBlank() -> tag | ||
!branch.isNullOrBlank() && branch.startsWith("refs/heads/") -> | ||
branch.substringAfter("refs/heads/").replace("/", "-") + "-SNAPSHOT" | ||
else -> "undefined" | ||
} | ||
} | ||
val isSnapshot: Boolean get() = version.endsWith("-SNAPSHOT") | ||
const val description = "Discord Emoji constants for Kord" | ||
const val projectUrl = "https://github.com/kordlib/kordx.emoji" | ||
/** | ||
* Whether the current API is considered stable, and should be compared to the 'golden' API dump. | ||
*/ | ||
val isRelease: Boolean get() = !isSnapshot && !isUndefined | ||
|
||
val isUndefined get() = version == "undefined" | ||
} | ||
|
||
object Repo { | ||
const val releasesUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
const val snapshotsUrl = "https://oss.sonatype.org/content/repositories/snapshots/" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
pluginManagement { | ||
repositories { | ||
gradlePluginPortal() | ||
mavenCentral() | ||
// Repo providing the Kord Gradle plugin | ||
maven("https://europe-west3-maven.pkg.dev/mik-music/kord") | ||
} | ||
} | ||
|
||
rootProject.name = "kordx.emoji" |