From 00915a625b3094291c7dccbe691949d71bcb1a33 Mon Sep 17 00:00:00 2001 From: Josh Feinberg Date: Wed, 16 Feb 2022 10:02:25 -0600 Subject: [PATCH] Upgrade sample app to Kotlin 1.6.10 and ensure it builds on CI --- .github/workflows/sample_app.yml | 28 +++++++++++++++++++ .../AffectedModuleDetectorIntegrationTest.kt | 2 +- sample/build.gradle | 2 ++ sample/buildSrc/build.gradle.kts | 5 ++-- .../kotlin/com/dropbox/sample/Dependencies.kt | 2 +- 5 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/sample_app.yml diff --git a/.github/workflows/sample_app.yml b/.github/workflows/sample_app.yml new file mode 100644 index 00000000..e3ae941d --- /dev/null +++ b/.github/workflows/sample_app.yml @@ -0,0 +1,28 @@ +# This workflow will build the sample app and ensure that all functionality works. + +name: Build sample app + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + sample-app: + runs-on: ubuntu-latest + timeout-minutes: 30 + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up our JDK environment + uses: actions/setup-java@v1.4.3 + with: + java-version: 1.8 + - name: Build sample + run: | + ./gradlew :affectedmoduledetector:publishToMavenLocal + cd sample + ./gradlew build + diff --git a/affectedmoduledetector/src/test/kotlin/com/dropbox/affectedmoduledetector/AffectedModuleDetectorIntegrationTest.kt b/affectedmoduledetector/src/test/kotlin/com/dropbox/affectedmoduledetector/AffectedModuleDetectorIntegrationTest.kt index 6d850190..5d3cfce5 100644 --- a/affectedmoduledetector/src/test/kotlin/com/dropbox/affectedmoduledetector/AffectedModuleDetectorIntegrationTest.kt +++ b/affectedmoduledetector/src/test/kotlin/com/dropbox/affectedmoduledetector/AffectedModuleDetectorIntegrationTest.kt @@ -60,7 +60,7 @@ class AffectedModuleDetectorIntegrationTest { | } | dependencies { | classpath "com.android.tools.build:gradle:4.1.0" - | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10" + | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10" | } |} |plugins { diff --git a/sample/build.gradle b/sample/build.gradle index a364e8a4..78792318 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -4,6 +4,7 @@ import com.dropbox.sample.Dependencies buildscript { repositories { google() + mavenCentral() maven { url "https://plugins.gradle.org/m2/" } @@ -36,6 +37,7 @@ affectedModuleDetector { allprojects { repositories { google() + mavenCentral() } } diff --git a/sample/buildSrc/build.gradle.kts b/sample/buildSrc/build.gradle.kts index c3ba11bb..4f6445f0 100644 --- a/sample/buildSrc/build.gradle.kts +++ b/sample/buildSrc/build.gradle.kts @@ -2,17 +2,18 @@ * Copyright (c) 2020, Dropbox, Inc. All rights reserved. */ plugins { - kotlin("jvm") version "1.4.10" + kotlin("jvm") version "1.6.10" `java-gradle-plugin` } repositories { google() + mavenCentral() mavenLocal() } dependencies { - implementation("com.dropbox.affectedmoduledetector:affectedmoduledetector:0.1.2-SNAPSHOT") + implementation("com.dropbox.affectedmoduledetector:affectedmoduledetector:0.1.4-SNAPSHOT") testImplementation("junit:junit:4.13.1") testImplementation("com.nhaarman:mockito-kotlin:1.5.0") testImplementation("com.google.truth:truth:1.0.1") diff --git a/sample/buildSrc/src/main/kotlin/com/dropbox/sample/Dependencies.kt b/sample/buildSrc/src/main/kotlin/com/dropbox/sample/Dependencies.kt index a01d10d0..39253711 100644 --- a/sample/buildSrc/src/main/kotlin/com/dropbox/sample/Dependencies.kt +++ b/sample/buildSrc/src/main/kotlin/com/dropbox/sample/Dependencies.kt @@ -2,7 +2,7 @@ package com.dropbox.sample object Dependencies { private object Versions { - const val KOTLIN_VERSION = "1.4.10" + const val KOTLIN_VERSION = "1.6.10" } object Libs {