Skip to content

Commit 9dfbbb2

Browse files
authored
Update to Kotlin 1.5.31 and other dependencies (#40)
1 parent 2d4d5b3 commit 9dfbbb2

File tree

35 files changed

+408
-313
lines changed

35 files changed

+408
-313
lines changed

.github/workflows/main.yml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,32 @@ jobs:
1818
- uses: actions/checkout@v2
1919
- uses: gradle/wrapper-validation-action@v1
2020

21+
create_staging_repository:
22+
runs-on: ubuntu-latest
23+
needs: [ validation ]
24+
name: Create staging repository
25+
outputs:
26+
repository_id: ${{ steps.create.outputs.repository_id }}
27+
steps:
28+
- id: create
29+
if: startsWith(github.ref, 'refs/tags/')
30+
uses: nexus-actions/[email protected]
31+
with:
32+
username: appmattus
33+
password: ${{ secrets.SONATYPE_PASSWORD }}
34+
staging_profile_id: ${{ secrets.SONATYPE_PROFILE_ID }}
35+
description: ${{ github.repository }}/${{ github.workflow }}#${{ github.run_number }}
36+
2137
build:
22-
needs: [validation]
38+
needs: [validation, create_staging_repository]
2339
runs-on: ubuntu-latest
2440

2541
steps:
2642
- uses: actions/checkout@v2
27-
28-
- name: set up JDK 1.8
29-
uses: actions/setup-java@v1
43+
- uses: actions/setup-java@v2
3044
with:
31-
java-version: 1.8
45+
distribution: 'zulu'
46+
java-version: '11'
3247

3348
- name: Build with Gradle
3449
run: ./gradlew assemble check --stacktrace
@@ -46,9 +61,11 @@ jobs:
4661
if: startsWith(github.ref, 'refs/tags/')
4762

4863
- name: Upload tag
49-
run: ./gradlew publish --no-daemon --no-parallel -Psigning.secretKeyRingFile=$(echo ~/.gradle/sonatype-appmattus-keys.gpg)
5064
if: startsWith(github.ref, 'refs/tags/')
65+
run: ./gradlew publish --no-daemon --no-parallel -Psigning.secretKeyRingFile=$(echo ~/.gradle/sonatype-appmattus-keys.gpg)
66+
env:
67+
SONATYPE_REPOSITORY_ID: ${{ needs.create_staging_repository.outputs.repository_id }}
5168

5269
- name: Close and release tag
53-
run: ./gradlew closeAndReleaseRepository
5470
if: startsWith(github.ref, 'refs/tags/')
71+
run: ./gradlew closeAndReleaseRepository

.github/workflows/ui-tests.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ jobs:
1717
matrix:
1818
api-level: [21, 23, 29]
1919
steps:
20-
- name: checkout
21-
uses: actions/checkout@v2
20+
- uses: actions/checkout@v2
21+
- uses: actions/setup-java@v2
22+
with:
23+
distribution: 'zulu'
24+
java-version: '11'
2225

2326
- name: run tests
2427
uses: reactivecircus/[email protected]

build.gradle.kts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616

1717
import com.appmattus.markdown.rules.LineLengthRule
18+
import com.vanniktech.maven.publish.MavenPublishBaseExtension
19+
import com.vanniktech.maven.publish.SonatypeHost.DEFAULT
1820
import org.jetbrains.dokka.gradle.DokkaPlugin
1921
import org.jetbrains.dokka.gradle.DokkaTask
2022
import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension
@@ -45,7 +47,6 @@ buildscript {
4547
subprojects {
4648
repositories {
4749
google()
48-
jcenter()
4950
mavenCentral()
5051
}
5152

@@ -74,6 +75,12 @@ subprojects {
7475

7576
version = System.getenv("GITHUB_REF")?.substring(10) ?: System.getProperty("GITHUB_REF")?.substring(10) ?: "unknown"
7677

78+
plugins.withId("com.vanniktech.maven.publish.base") {
79+
configure<MavenPublishBaseExtension> {
80+
publishToMavenCentral(DEFAULT, System.getenv("SONATYPE_REPOSITORY_ID"))
81+
}
82+
}
83+
7784
plugins.withType<DokkaPlugin> {
7885
tasks.withType<DokkaTask>().configureEach {
7986
dokkaSourceSets {

buildSrc/build.gradle.kts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,10 @@ plugins {
2121
}
2222

2323
repositories {
24-
jcenter()
24+
mavenCentral()
2525
}
2626

27-
kotlinDslPluginOptions {
28-
experimentalWarning.set(false)
29-
}
30-
31-
tasks.withType(KotlinCompile::class.java).all {
27+
tasks.withType<KotlinCompile>().all {
3228
kotlinOptions {
3329
jvmTarget = JavaVersion.VERSION_1_8.toString()
3430
}

buildSrc/src/main/kotlin/Versions.kt

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,59 +16,58 @@
1616

1717
object Versions {
1818

19-
const val kotlin = "1.4.30"
19+
const val kotlin = "1.5.31"
2020

21-
const val androidGradlePlugin = "4.1.2"
22-
const val detektGradlePlugin = "1.16.0-RC1"
21+
const val androidGradlePlugin = "7.0.2"
22+
const val detektGradlePlugin = "1.18.1"
2323
const val gradleVersionsPlugin = "0.36.0"
2424
const val markdownlintGradlePlugin = "0.6.0"
25-
const val gradleMavenPublishPlugin = "0.14.2"
26-
const val dokkaPlugin = "1.4.20"
25+
const val gradleMavenPublishPlugin = "0.18.0"
26+
const val dokkaPlugin = "1.5.31"
2727

28-
const val bouncyCastle = "1.68"
29-
const val cache2k = "2.0.0.Final"
30-
const val coroutines = "1.4.2"
28+
const val bouncyCastle = "1.69"
29+
const val cache2k = "2.2.1.Final"
30+
const val coroutines = "1.5.2"
3131
const val diskLruCache = "2.0.2"
32-
const val ehcache = "3.9.1"
32+
const val ehcache = "3.9.6"
3333
const val groupie = "2.9.0"
34-
const val ktor = "1.5.1"
35-
const val orbitMvi = "3.0.1"
36-
const val slf4j = "1.7.30"
37-
const val sqlDelight = "1.4.4"
34+
const val ktor = "1.6.4"
35+
const val orbitMvi = "4.2.0"
36+
const val slf4j = "1.7.32"
37+
const val sqlDelight = "1.5.1"
3838
const val systemRules = "1.19.0"
3939

4040
const val junit4 = "4.13.2"
41-
const val mockito = "3.7.7"
42-
const val mockitoKotlin = "2.2.0"
41+
const val mockito = "4.0.0"
42+
const val mockitoKotlin = "3.2.0"
4343
const val objenesis = "2.6"
4444
const val retrofit = "2.9.0"
45-
const val robolectric = "4.5.1"
45+
const val robolectric = "4.6.1"
4646

4747
const val desugar = "1.1.1"
4848

4949
object AndroidX {
50-
const val annotation = "1.1.0"
51-
const val appCompat = "1.2.0"
52-
const val constraintLayout = "2.1.0-alpha2"
53-
const val fragment = "1.3.0"
54-
const val hilt = "1.0.0-alpha02"
55-
const val lifecycle = "2.3.0"
56-
const val navigation = "2.3.3"
50+
const val annotation = "1.2.0"
51+
const val appCompat = "1.3.1"
52+
const val constraintLayout = "2.1.1"
53+
const val fragment = "1.3.6"
54+
const val lifecycle = "2.3.1"
55+
const val navigation = "2.3.5"
5756
const val multidex = "2.0.1"
5857
const val securityCrypto = "1.1.0-alpha03"
5958

60-
const val testCore = "1.3.0"
61-
const val testExtJunit = "1.1.2"
62-
const val testRunner = "1.3.0"
59+
const val testCore = "1.4.0"
60+
const val testExtJunit = "1.1.3"
61+
const val testRunner = "1.4.0"
6362
}
6463

6564
object Google {
66-
const val dagger = "2.31.1-alpha"
67-
const val material = "1.3.0-rc01"
68-
const val tink = "1.5.0"
65+
const val dagger = "2.39.1"
66+
const val material = "1.4.0"
67+
const val tink = "1.6.1"
6968
}
7069

7170
object Kotlinx {
72-
const val serialization = "1.1.0"
71+
const val serialization = "1.3.0"
7372
}
7473
}

gradle/scripts/dependencyUpdates.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
2020
buildscript {
2121
repositories {
2222
google()
23-
jcenter()
24-
maven(url = "https://plugins.gradle.org/m2/")
23+
mavenCentral()
24+
gradlePluginPortal()
2525
}
2626
dependencies {
2727
classpath("com.github.ben-manes:gradle-versions-plugin:${Versions.gradleVersionsPlugin}")

gradle/scripts/detekt.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ buildscript {
2727
}
2828

2929
repositories {
30-
jcenter()
30+
mavenCentral()
3131
}
3232

3333
apply<DetektPlugin>()

gradle/wrapper/gradle-wrapper.jar

333 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)