Skip to content

Commit

Permalink
Reformat publishing section of build.gradle.kts
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrelliCopter committed Sep 1, 2023
1 parent 0e0d015 commit 0d82430
Showing 1 changed file with 26 additions and 33 deletions.
59 changes: 26 additions & 33 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ repositories {

dependencies {
implementation("org.jetbrains.kotlinx", "kotlinx-serialization-json", "1.3.3")

testImplementation(kotlin("test"))
}

Expand All @@ -40,39 +39,33 @@ gradlePlugin {
}

publishing {
repositories {
mavenLocal()

var githubPackagesToken = System.getenv("GITHUB_TOKEN")
if (githubPackagesToken == null) {
githubPackagesToken = project.findProperty("github.token") as String?
}

var gitlabPackagesToken = System.getenv("GITLAB_TOKEN")
if (gitlabPackagesToken == null) {
gitlabPackagesToken = project.findProperty("gitlab.com.accessToken") as String?
}
repositories {
mavenLocal()

maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/gaypizzaspecifications/drywall")
credentials {
username = project.findProperty("github.username") as String? ?: "gaypizzaspecifications"
password = githubPackagesToken
}
}
val githubPackagesToken = System.getenv("GITHUB_TOKEN")
?: project.findProperty("github.token") as String?
val gitlabPackagesToken = System.getenv("GITLAB_TOKEN")
?: project.findProperty("gitlab.com.accessToken") as String?

maven {
name = "GitLab"
url = uri("https://gitlab.com/api/v4/projects/47347654/packages/maven")
credentials(HttpHeaderCredentials::class.java) {
name = "Private-Token"
value = gitlabPackagesToken
}
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/gaypizzaspecifications/drywall")
credentials {
username = project.findProperty("github.username") as String? ?: "gaypizzaspecifications"
password = githubPackagesToken
}
}

authentication {
create<HttpHeaderAuthentication>("header")
}
}
}
maven {
name = "GitLab"
url = uri("https://gitlab.com/api/v4/projects/47347654/packages/maven")
credentials(HttpHeaderCredentials::class.java) {
name = "Private-Token"
value = gitlabPackagesToken
}
authentication {
create<HttpHeaderAuthentication>("header")
}
}
}
}

0 comments on commit 0d82430

Please sign in to comment.