Skip to content

Commit 8295d47

Browse files
committed
Implement maven deployment and update versions
1 parent da6568e commit 8295d47

File tree

22 files changed

+186
-442
lines changed

22 files changed

+186
-442
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: build
1+
name: "build"
22

33
on: push
44

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "deploy release"
2+
3+
on:
4+
push:
5+
tags-ignore:
6+
- '*-SNAPSHOT'
7+
8+
jobs:
9+
all_checks:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: "Checkout"
13+
uses: actions/checkout@v1
14+
- name: "Set up Java"
15+
uses: actions/setup-java@v1
16+
with:
17+
java-version: 1.8
18+
- name: "Checks all the things"
19+
run: ./gradlew lint ktlintCheck test jacocoTestCoverageVerification pitest apiCheck assemble
20+
21+
publish:
22+
needs: [ all_checks ]
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: "Checkout"
26+
uses: actions/checkout@v1
27+
- name: "Set up Java"
28+
uses: actions/setup-java@v1
29+
with:
30+
java-version: 1.8
31+
- name: "Get tag and save into env"
32+
uses: olegtarasov/get-tag@v2.1
33+
id: tagName
34+
- name: "Upload release"
35+
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel
36+
env:
37+
libraryVersionTag: ${{ steps.tagName.outputs.tag }}
38+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
39+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
40+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }}
41+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
42+
- name: "Publish release"
43+
run: ./gradlew closeAndReleaseRepository --no-daemon --no-parallel
44+
env:
45+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
46+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: deploy
1+
name: "deploy snapshot"
22

33
on:
44
push:
55
tags:
6-
- '*'
6+
- '*-SNAPSHOT'
77

88
jobs:
99
all_checks:
@@ -19,7 +19,7 @@ jobs:
1919
run: ./gradlew lint ktlintCheck test jacocoTestCoverageVerification pitest apiCheck assemble
2020

2121
publish:
22-
needs: [all_checks]
22+
needs: [ all_checks ]
2323
runs-on: ubuntu-latest
2424
steps:
2525
- name: "Checkout"
@@ -29,11 +29,11 @@ jobs:
2929
with:
3030
java-version: 1.8
3131
- name: "Get tag and save into env"
32-
uses: olegtarasov/get-tag@v1
32+
uses: olegtarasov/get-tag@v2.1
3333
id: tagName
34-
- name: "Build, publish and upload to Bintray"
34+
- name: "Upload release"
35+
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel
3536
env:
3637
libraryVersionTag: ${{ steps.tagName.outputs.tag }}
37-
bintrayUser: ${{ secrets.BINTRAY_USER }}
38-
bintrayApiKey: ${{ secrets.BINTRAY_TOKEN }}
39-
run: ./gradlew build publish bintrayUpload
38+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
39+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}

.idea/gradle.xml

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.media/btc.png

-3.11 KB
Binary file not shown.

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44

55
- binary compatibility will now be verified and held up on every release.
66

7-
## `[0.14.0]` - 2021-XX-XX
7+
## `[0.14.0]` - 2021-10-17
88

9-
- Update kotlinx.coroutines to `1.4.3`.
9+
- Update kotlinx.coroutines to `1.5.2`.
1010
- Remove kotlin as `api` dependency.
1111
- Remove `ControllerLog.default`.
1212
- Lazily start controller when accessing `Controller.effects` field (#26)
13+
- `control-core` will now be deployed to mavenCentral
1314

1415
## `[0.13.1]` - 2020-09-13
1516

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ test coverage is automatically run by github actions on `[push]`
5353

5454
| | threshold | run | output |
5555
|---:|:---:|---|---|
56-
| instruction/branch | 90% | `./gradlew test jacocoTestReport` | `./control-core/build/reports/jacoco/` |
56+
| instruction/branch | 94% | `./gradlew test jacocoTestReport` | `./control-core/build/reports/jacoco/` |
5757
| mutation | 100% | `./gradlew pitest` | `./control-core/build/reports/pitest/` |
5858

5959
## author

build.gradle.kts

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,22 @@ buildscript {
77
}
88

99
dependencies {
10-
classpath(Libs.kotlin_gradle_plugin)
11-
classpath(Libs.com_jfrog_bintray_gradle_plugin)
12-
classpath(Libs.com_android_tools_build_gradle)
13-
classpath(Libs.kotlin_serialization)
14-
classpath(Libs.gradle_pitest_plugin)
15-
classpath(Libs.binary_compatibility_validator)
10+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0")
11+
classpath("info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.7.0")
12+
classpath("org.jetbrains.kotlinx:binary-compatibility-validator:0.7.1")
13+
classpath("com.vanniktech:gradle-maven-publish-plugin:0.18.0")
14+
classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.5.31")
15+
16+
classpath("com.android.tools.build:gradle:4.2.2")
17+
classpath("org.jetbrains.kotlin:kotlin-serialization:1.5.31")
1618
}
1719
}
1820

1921
plugins {
20-
buildSrcVersions
2122
jacoco
22-
id("org.jlleitschuh.gradle.ktlint").version(Versions.org_jlleitschuh_gradle_ktlint_gradle_plugin)
23+
id("org.jlleitschuh.gradle.ktlint").version("10.0.0")
24+
`maven-publish`
25+
signing
2326
}
2427

2528
// ---- api-validation --- //
@@ -30,7 +33,7 @@ configure<kotlinx.validation.ApiValidationExtension> {
3033
ignoredProjects.addAll(listOf("kotlin-counter", "android-counter", "android-github"))
3134
}
3235

33-
// ---- api-validation --- //
36+
// ---- end api-validation --- //
3437

3538
// ---- jacoco --- //
3639

@@ -46,7 +49,7 @@ subprojects {
4649
}
4750
}
4851

49-
// ---- jacoco --- //
52+
// ---- end jacoco --- //
5053

5154
allprojects {
5255
repositories {

buildSrc/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)