Skip to content

Commit

Permalink
Publish to Bintray
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberdelia committed May 23, 2020
1 parent b4606c5 commit 159d650
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
key: gradle-${{ hashFiles('build.gradle.kts') }}
- name: Publish artifact
env:
BINTRAY_USERNAME: ${{ secrets.BINTRAY_USERNAME }}
BINTRAY_TOKEN: ${{ secrets.BINTRAY_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# The GITHUB_REF tag comes in the format 'refs/tags/xxx'.
# So if we split on '/' and take the 3rd value, we can get the release name.
Expand Down
6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 31 additions & 16 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,27 @@ dependencies {
testImplementation("io.mockk:mockk:1.10.0")
}

tasks.register<Jar>("sourcesJar") {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}

tasks.named<KotlinCompile>("compileKotlin") {
kotlinOptions.freeCompilerArgs = listOf("-Xexplicit-api=strict")
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}

tasks.withType<DokkaTask> {
outputFormat = "gfm"
}

kotlinter {
disabledRules = arrayOf("import-ordering")
}

publishing {
repositories {
maven {
Expand All @@ -46,11 +67,21 @@ publishing {
password = System.getenv("GITHUB_TOKEN")
}
}

maven {
name = "Bintray"
url = uri("https://api.bintray.com/maven/cyberdelia/lapanthere/signals/;publish=1")
credentials {
username = System.getenv("BINTRAY_USERNAME")
password = System.getenv("BINTRAY_TOKEN")
}
}
}

publications {
create<MavenPublication>("default") {
from(components["java"])
artifact(tasks["sourcesJar"])
pom {
name.set("Signals")
description.set("S3 Streaming Client")
Expand All @@ -64,19 +95,3 @@ publishing {
}
}
}

tasks.named<KotlinCompile>("compileKotlin") {
kotlinOptions.freeCompilerArgs = listOf("-Xexplicit-api=strict")
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}

tasks.withType<DokkaTask> {
outputFormat = "gfm"
}

kotlinter {
disabledRules = arrayOf("import-ordering")
}

0 comments on commit 159d650

Please sign in to comment.