-
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
Showing
8 changed files
with
126 additions
and
64 deletions.
There are no files selected for viewing
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
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,5 +1,7 @@ | ||
plugins { | ||
kotlin("jvm") | ||
id("org.jetbrains.dokka") | ||
`maven-publish-config` | ||
} | ||
|
||
dependencies { | ||
|
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} |
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,30 @@ | ||
@file:Suppress("RemoveExplicitTypeArguments") | ||
|
||
|
||
val airinPublications = mapOf<GradleProjectName, Publication>( | ||
|
||
"airin-starlark" to Publication( | ||
name = "Airin Starlark", | ||
description = "A declarative, type-safe Starlark template engine that allows writing Starlark code templates in Kotlin." | ||
), | ||
|
||
"airin-migration-core" to Publication( | ||
name = "Airin Migration Core", | ||
description = "Core APIs for migration to Bazel." | ||
), | ||
|
||
"airin-gradle" to Publication( | ||
name = "Airin Gradle", | ||
description = "Airin Gradle plugin for migration to Bazel." | ||
), | ||
|
||
"airin-gradle-android" to Publication( | ||
name = "Airin Gradle Android", | ||
description = "Android extensions for Airin Gradle plugin." | ||
) | ||
) | ||
|
||
|
||
typealias GradleProjectName = String | ||
|
||
data class Publication(val name: String, val description: String) |
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,81 @@ | ||
plugins { | ||
`maven-publish` | ||
signing | ||
} | ||
|
||
val sourceSets = the<SourceSetContainer>() | ||
|
||
tasks { | ||
register<Jar>("javadocJar") { | ||
dependsOn(named("dokkaHtml")) | ||
archiveClassifier.set("javadoc") | ||
from("$buildDir/dokka/html") | ||
} | ||
register<Jar>("sourcesJar") { | ||
archiveClassifier.set("sources") | ||
from(sourceSets["main"].allJava.srcDirs) | ||
} | ||
} | ||
|
||
|
||
val airinMaven = "airinMaven" | ||
|
||
publishing { | ||
publications { | ||
register<MavenPublication>(airinMaven) { | ||
artifactId = project.name | ||
artifact(tasks.getByName("javadocJar")) | ||
artifact(tasks.getByName("sourcesJar")) | ||
|
||
pom { | ||
name.set(airinPublications[project.name]!!.name) | ||
description.set(airinPublications[project.name]!!.description) | ||
url.set("https://github.com/Morfly/airin") | ||
|
||
licenses { | ||
license { | ||
name.set("The Apache License, Version 2.0") | ||
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt") | ||
} | ||
} | ||
developers { | ||
developer { | ||
id.set("morfly") | ||
name.set("Pavlo Stavytskyi") | ||
email.set("pavlo.stavytskyi@gmail.com") | ||
} | ||
} | ||
scm { | ||
connection.set("scm:git:git://github.com/Morfly/airin.git") | ||
developerConnection.set("scm:git:ssh://github.com/Morfly/airin.git") | ||
url.set("https://github.com/Morfly/airin") | ||
} | ||
} | ||
|
||
from(components["kotlin"]) | ||
} | ||
|
||
repositories { | ||
maven { | ||
// publishAirinMavenPublicationToMavenRepository | ||
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") | ||
credentials { | ||
val sonatypeUsername: String by project | ||
val sonatypePassword: String by project | ||
username = sonatypeUsername | ||
password = sonatypePassword | ||
} | ||
} | ||
maven { | ||
// publishAirinMavenPublicationToLocalRepository | ||
name = "local" | ||
url = uri("$buildDir/repo") | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
sign(publishing.publications[airinMaven]) | ||
// useGpgCmd() | ||
} |
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,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |