Skip to content

Commit

Permalink
Dependency Version Updates (#40)
Browse files Browse the repository at this point in the history
Co-authored-by: Travis Wyatt <[email protected]>
  • Loading branch information
cedrickcooke and twyatt authored Jul 9, 2021
1 parent 72ce7de commit 218dcc6
Show file tree
Hide file tree
Showing 17 changed files with 182 additions and 190 deletions.
81 changes: 41 additions & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,60 @@
name: CI
on:
push:
pull_request:

env:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"

jobs:
build:
runs-on: ubuntu-18.04

env:
GRADLE_ARGS: >-
--no-daemon
--max-workers 2
-Pkotlin.incremental=false
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Set up JDK
uses: actions/setup-java@v1
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v2
with:
java-version: 1.8
distribution: "adopt-hotspot"
java-version: "11.0.11+9"

- name: Gradle cache
uses: actions/cache@v2
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.konan
key: ${{ runner.os }}-build-${{ hashFiles('**/build.gradle.kts') }}
~/.android/build-cache
~/.android/cache
key: ${{ runner.os }}-build-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-
- name: Check
run: ./gradlew $GRADLE_ARGS check jacocoTestReport

- name: Keyring
run: echo "${{ secrets.SIGNING_SECRET_KEY_RING }}" | base64 --decode > "$HOME/secring.gpg"

- name: Publish Locally
run: >-
./gradlew
$GRADLE_ARGS
--no-parallel
-PVERSION_NAME=unspecified
-Psigning.keyId="${{ secrets.SIGNING_KEY_ID }}"
-Psigning.password="${{ secrets.SIGNING_PASSWORD }}"
-Psigning.secretKeyRingFile="$HOME/secring.gpg"
publishToMavenLocal
- name: Codecov
uses: codecov/codecov-action@v1
- run: ./gradlew check jacocoTestReport
- uses: EnricoMi/publish-unit-test-result-action@v1
with:
files: '**/build/test-results/**/*.xml'
report_individual_runs: 'true'

- run: |
set -o xtrace
if [ ! -z "${{ secrets.SIGNING_KEY }}" ]; then
./gradlew \
--no-parallel \
-PVERSION_NAME="unspecified" \
-PsigningInMemoryKey="${{ secrets.SIGNING_KEY }}" \
-PsigningInMemoryKeyPassword="${{ secrets.SIGNING_PASSWORD }}" \
publishToMavenLocal
else
./gradlew \
--no-parallel \
-PVERSION_NAME="unspecified-SNAPSHOT" \
publishToMavenLocal
fi
- uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true

- run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
62 changes: 25 additions & 37 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,44 @@ on:
types:
- published

env:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"

jobs:
publish:
runs-on: ubuntu-18.04

env:
GRADLE_ARGS: >-
--no-daemon
--max-workers 2
-Pkotlin.incremental=false
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Set up JDK
uses: actions/setup-java@v1
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v2
with:
java-version: 1.8
distribution: "adopt-hotspot"
java-version: "11.0.11+9"

- name: Gradle cache
uses: actions/cache@v1
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.konan
key: ${{ runner.os }}-publish-${{ hashFiles('**/build.gradle.kts') }}
~/.android/build-cache
~/.android/cache
key: ${{ runner.os }}-publish-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-publish-
${{ runner.os }}-
- name: Check
run: ./gradlew $GRADLE_ARGS check

- name: Keyring
run: echo "${{ secrets.SIGNING_SECRET_KEY_RING }}" | base64 --decode > ~/secring.gpg

- name: Publish
env:
SONATYPE_NEXUS_USERNAME: ${{ secrets.OSS_SONATYPE_NEXUS_USERNAME }}
SONATYPE_NEXUS_PASSWORD: ${{ secrets.OSS_SONATYPE_NEXUS_PASSWORD }}
run: >-
- run: ./gradlew check
- run: >-
./gradlew
$GRADLE_ARGS
--no-parallel
-PVERSION_NAME=${GITHUB_REF/refs\/tags\//}
-Psigning.keyId="${{ secrets.SIGNING_KEY_ID }}"
-Psigning.password="${{ secrets.SIGNING_PASSWORD }}"
-Psigning.secretKeyRingFile="$HOME/secring.gpg"
uploadArchives
-PVERSION_NAME="${GITHUB_REF/refs\/tags\//}"
-PsigningInMemoryKey="${{ secrets.SIGNING_KEY }}"
-PsigningInMemoryKeyPassword="${{ secrets.SIGNING_PASSWORD }}"
-PmavenCentralUsername="${{ secrets.OSS_SONATYPE_NEXUS_USERNAME }}"
-PmavenCentralPassword="${{ secrets.OSS_SONATYPE_NEXUS_PASSWORD }}"
publish
- run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
45 changes: 18 additions & 27 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,38 @@ on:
branches:
- main

env:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"

jobs:
snapshot:
runs-on: ubuntu-18.04

env:
GRADLE_ARGS: >-
--no-daemon
--max-workers 2
-Pkotlin.incremental=false
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v1
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v2
with:
java-version: 1.8
distribution: "adopt-hotspot"
java-version: "11.0.11+9"

- name: Gradle cache
uses: actions/cache@v2
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.konan
key: ${{ runner.os }}-snapshot-${{ hashFiles('**/build.gradle.kts') }}
~/.android/build-cache
~/.android/cache
key: ${{ runner.os }}-snapshot-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-snapshot-
${{ runner.os }}-
- name: Check
run: ./gradlew $GRADLE_ARGS check

- name: Snapshot
env:
SONATYPE_NEXUS_USERNAME: ${{ secrets.OSS_SONATYPE_NEXUS_USERNAME }}
SONATYPE_NEXUS_PASSWORD: ${{ secrets.OSS_SONATYPE_NEXUS_PASSWORD }}
run: >-
- run: ./gradlew check
- run: >-
./gradlew
$GRADLE_ARGS
--no-parallel
-PVERSION_NAME=main-SNAPSHOT
uploadArchives
-PmavenCentralUsername="${{ secrets.OSS_SONATYPE_NEXUS_USERNAME }}"
-PmavenCentralPassword="${{ secrets.OSS_SONATYPE_NEXUS_PASSWORD }}"
publish
23 changes: 7 additions & 16 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,20 @@ buildscript {
}

plugins {
kotlin("jvm") version "1.4.30" apply false
id("com.android.application") version "4.0.0" apply false
id("com.android.library") version "4.0.0" apply false
id("org.jmailen.kotlinter") version "3.2.0" apply false
id("binary-compatibility-validator") version "0.2.3"
id("org.jetbrains.dokka") version "1.4.30" apply false
id("com.vanniktech.maven.publish") version "0.13.0" apply false
kotlin("jvm") version "1.5.10" apply false
id("com.android.application") version "4.2.0" apply false
id("com.android.library") version "4.2.0" apply false
id("org.jmailen.kotlinter") version "3.4.5" apply false
id("binary-compatibility-validator") version "0.6.0"
id("org.jetbrains.dokka") version "1.5.0" apply false
id("com.vanniktech.maven.publish") version "0.17.0" apply false
id("net.mbonnin.one.eight") version "0.2"
}

subprojects {
repositories {
mavenCentral()
google()
jcenter {
content {
// https://youtrack.jetbrains.com/issue/IDEA-261387
includeModule("org.jetbrains.trove4j", "trove4j")

// https://github.com/Kotlin/kotlinx.html/issues/173
includeModule("org.jetbrains.kotlinx", "kotlinx-html-jvm")
}
}
}

tasks.withType<Test>().configureEach {
Expand Down
8 changes: 4 additions & 4 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ fun assertj(

fun kotlinCompileTesting(
submodule: String? = null,
version: String = "1.3.6"
version: String = "1.4.2"
) = when (submodule) {
null -> "com.github.tschuchortdev:kotlin-compile-testing:$version"
else -> "com.github.tschuchortdev:kotlin-compile-testing-$submodule:$version"
}

fun kotlinPoet(
version: String = "1.7.2"
version: String = "1.9.0"
) = "com.squareup:kotlinpoet:$version"

fun kotlinSymbolProcessing(
version: String = "1.4.31-1.0.0-alpha06"
version: String = "1.5.10-1.0.0-beta01"
) = "com.google.devtools.ksp:symbol-processing-api:$version"

fun robolectric(
Expand All @@ -25,5 +25,5 @@ fun robolectric(

fun tuulbox(
module: String,
version: String = "3.2.0"
version: String = "4.2.0"
) = "com.juul.tuulbox:$module:$version"
7 changes: 2 additions & 5 deletions compile/api/compile.api
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
public final class com/juul/exercise/compile/ExerciseProcessor : com/google/devtools/ksp/processing/SymbolProcessor {
public final class com/juul/exercise/compile/ExerciseProcessorProvider : com/google/devtools/ksp/processing/SymbolProcessorProvider {
public fun <init> ()V
public fun finish ()V
public fun init (Ljava/util/Map;Lkotlin/KotlinVersion;Lcom/google/devtools/ksp/processing/CodeGenerator;Lcom/google/devtools/ksp/processing/KSPLogger;)V
public fun onError ()V
public fun process (Lcom/google/devtools/ksp/processing/Resolver;)Ljava/util/List;
public fun create (Lcom/google/devtools/ksp/processing/SymbolProcessorEnvironment;)Lcom/google/devtools/ksp/processing/SymbolProcessor;
}

Loading

0 comments on commit 218dcc6

Please sign in to comment.