diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5e7ffcb..7a28f43 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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. diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..61a9130 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index a22c5dc..b287fa5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -36,6 +36,27 @@ dependencies { testImplementation("io.mockk:mockk:1.10.0") } +tasks.register("sourcesJar") { + archiveClassifier.set("sources") + from(sourceSets.main.get().allSource) +} + +tasks.named("compileKotlin") { + kotlinOptions.freeCompilerArgs = listOf("-Xexplicit-api=strict") +} + +tasks.withType { + kotlinOptions.jvmTarget = "1.8" +} + +tasks.withType { + outputFormat = "gfm" +} + +kotlinter { + disabledRules = arrayOf("import-ordering") +} + publishing { repositories { maven { @@ -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("default") { from(components["java"]) + artifact(tasks["sourcesJar"]) pom { name.set("Signals") description.set("S3 Streaming Client") @@ -64,19 +95,3 @@ publishing { } } } - -tasks.named("compileKotlin") { - kotlinOptions.freeCompilerArgs = listOf("-Xexplicit-api=strict") -} - -tasks.withType { - kotlinOptions.jvmTarget = "1.8" -} - -tasks.withType { - outputFormat = "gfm" -} - -kotlinter { - disabledRules = arrayOf("import-ordering") -}