Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency updates, JDK17 #829

Merged
merged 20 commits into from Jul 27, 2022
8 changes: 1 addition & 7 deletions .github/workflows/gradle.yml
Expand Up @@ -11,13 +11,8 @@ jobs:
strategy:
matrix:
java-version: [11, 12, 13, 14, 15, 16, 17]
kotlin-version: [1.4.32, 1.5.31, 1.6.0]
kotlin-version: [1.6.21, 1.7.0-RC]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd keep a 1.4.* and a 1.5.* here.

kotlin-ir-enabled: [true, false]
exclude:
- kotlin-version: 1.4.32
java-version: 16
- kotlin-version: 1.4.32
java-version: 17
# in case one JDK fails, we still want to see results from others
fail-fast: false
runs-on: ubuntu-latest
Expand Down Expand Up @@ -66,4 +61,3 @@ jobs:
with:
api-level: ${{ matrix.api-level }}
script: ./gradlew connectedCheck

4 changes: 2 additions & 2 deletions agent/android/build.gradle
Expand Up @@ -40,7 +40,7 @@ task packageDispatcherJar(type: Jar) {
preBuild.dependsOn(packageDispatcherJar)

android {
compileSdkVersion 'android-31'
compileSdkVersion 'android-32'

lintOptions {
abortOnError false
Expand Down Expand Up @@ -83,7 +83,7 @@ dependencies {
api project(':mockk-agent-common')
implementation "com.linkedin.dexmaker:dexmaker:$dexmaker_version"
implementation "org.objenesis:objenesis:$objenesis_android_version"
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', {
androidTestImplementation('androidx.test.espresso:espresso-core:3.4.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestImplementation 'junit:junit:4.13.1'
Expand Down
6 changes: 3 additions & 3 deletions agent/android/dispatcher/build.gradle.kts
Expand Up @@ -5,7 +5,7 @@ plugins {
}

android {
compileSdkVersion = "android-31"
compileSdkVersion = "android-32"

android {
lintOptions {
Expand All @@ -25,7 +25,7 @@ android {
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}
18 changes: 9 additions & 9 deletions build.gradle
@@ -1,14 +1,14 @@
buildscript {
ext.kotlin_gradle_version = findProperty('kotlin.version')?.toString() ?: '1.6.0'
ext.android_gradle_version = '7.0.0'
ext.byte_buddy_version = '1.12.6'
ext.kotlin_gradle_version = findProperty('kotlin.version')?.toString() ?: '1.6.21'
ext.android_gradle_version = '7.2.0'
ext.byte_buddy_version = '1.12.10'
ext.coroutines_version = '1.3.3'
ext.dexmaker_version = '2.28.1'
ext.objenesis_version = '3.2'
ext.objenesis_android_version = '3.2'
ext.junit_jupiter_version = '5.6.2'
ext.junit_vintage_version = '5.6.2'
ext.dokka_version = '1.6.0'
ext.dokka_version = '1.6.21'
ext.gradles = project.projectDir.toString() + "/gradle"

repositories {
Expand All @@ -29,8 +29,8 @@ plugins {
subprojects { subProject ->
group = 'io.mockk'

ext.kotlin_version = findProperty('kotlin.version')?.toString() ?: '1.6.0'
ext.kotlin_gradle_version = findProperty('kotlin.version')?.toString() ?: '1.6.0'
ext.kotlin_version = findProperty('kotlin.version')?.toString() ?: '1.6.21'
ext.kotlin_gradle_version = findProperty('kotlin.version')?.toString() ?: '1.6.21'

repositories {
mavenCentral()
Expand All @@ -39,9 +39,9 @@ subprojects { subProject ->

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
apiVersion = "1.4"
languageVersion = "1.4"
jvmTarget = "17"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about these: there have been issues about 1.4.* compatibilty in the past, meaning that some folks are still using MockK with Kotlin 1.4.*, so I'd like it to be backwards-compatible at least up to these versions.

apiVersion = "1.6"
languageVersion = "1.6"
useIR = findProperty("kotlin.ir.enabled")?.toBoolean() == true
}
}
Expand Down
12 changes: 6 additions & 6 deletions client-tests/jvm/build.gradle.kts
@@ -1,6 +1,6 @@
buildscript {
ext {
kotlin_version = "1.3.72"
kotlin_version = "1.6.21"
}
repositories {
mavenCentral()
Expand All @@ -12,12 +12,12 @@ buildscript {
}

plugins {
kotlin("jvm") version "1.3.72"
kotlin("jvm") version "1.6.21"
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

configurations.all({
Expand Down Expand Up @@ -53,8 +53,8 @@ dependencies {
exclude(group = "junit", module = "junit")
}

testImplementation("org.slf4j:slf4j-api:1.7.32")
testImplementation("ch.qos.logback:logback-classic:1.2.9")
testImplementation("org.slf4j:slf4j-api:1.7.36")
testImplementation("ch.qos.logback:logback-classic:1.2.11")

compileOnly("org.junit.jupiter:junit-jupiter-api:$junit_jupiter_version")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junit_jupiter_version")
Expand Down
4 changes: 2 additions & 2 deletions dsl/common/build.gradle.kts
Expand Up @@ -9,6 +9,6 @@ apply(from = "${rootProject.extensions.extraProperties["gradles"]}/additional-ar
apply(from = "${rootProject.extensions.extraProperties["gradles"]}/upload.gradle")

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
2 changes: 1 addition & 1 deletion gradle.properties
@@ -1,4 +1,4 @@
version=1.12.5-SNAPSHOT
version=1.13.0-SNAPSHOT
org.gradle.configureondemand=false
org.gradle.jvmargs=-XX:MaxMetaspaceSize=768m
# localrepo=build/mockk-repo
Expand Down
4 changes: 2 additions & 2 deletions gradle/jacoco.gradle
@@ -1,7 +1,7 @@
apply plugin: 'jacoco'

jacoco {
toolVersion = "0.8.7"
toolVersion = "0.8.8"
}

afterEvaluate {
Expand All @@ -23,4 +23,4 @@ afterEvaluate {
}

check.dependsOn jacocoTestReport
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
5 changes: 5 additions & 0 deletions jitpack.yml
@@ -0,0 +1,5 @@
jdk:
- openjdk17
install:
- echo "Running a custom install command"
- ./gradlew clean :publishMavenPublicationToMavenLocal -xtest
11 changes: 5 additions & 6 deletions mockk/android/build.gradle.kts
Expand Up @@ -11,7 +11,7 @@ extra["mavenDescription"] = "mocking library for Kotlin (Android instrumented te
apply(from = "${rootProject.extensions.extraProperties["gradles"]}/upload.gradle")

android {
compileSdkVersion("android-31")
compileSdkVersion("android-32")


lintOptions {
Expand Down Expand Up @@ -40,8 +40,8 @@ android {
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

}
Expand All @@ -57,18 +57,17 @@ dependencies {
implementation(project(":mockk-agent-api"))

testImplementation("junit:junit:4.13.1")
androidTestImplementation("com.android.support.test.espresso:espresso-core:3.0.2") {
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0") {
exclude(group = "com.android.support", module = "support-annotations")
}
androidTestImplementation(Deps.Libs.kotlinReflect(kotlinVersion()))
androidTestImplementation(Deps.Libs.kotlinCoroutinesCore())
androidTestImplementation(Deps.Libs.kotlinTestJunit()) {
exclude(group = "junit", module = "junit")
}
androidTestImplementation("com.android.support.test:rules:1.0.2")
androidTestImplementation("androidx.test:rules:1.4.0")

androidTestImplementation(Deps.Libs.junitJupiterApi)
androidTestImplementation(Deps.Libs.junitJupiterEngine)
androidTestImplementation(Deps.Libs.junitVintageEngine)
}

4 changes: 2 additions & 2 deletions mockk/common/build.gradle.kts
Expand Up @@ -9,8 +9,8 @@ apply(from = "${rootProject.extensions.extraProperties["gradles"]}/additional-ar
apply(from = "${rootProject.extensions.extraProperties["gradles"]}/upload.gradle")

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

dependencies {
Expand Down
6 changes: 3 additions & 3 deletions mockk/jvm/build.gradle.kts
Expand Up @@ -19,8 +19,8 @@ dependencies {

implementation(Deps.Libs.kotlinReflect(kotlinVersion()))
compileOnly(Deps.Libs.kotlinCoroutinesCore())
compileOnly("org.slf4j:slf4j-api:1.7.26")
compileOnly("junit:junit:4.13.1")
compileOnly("org.slf4j:slf4j-api:1.7.36")
compileOnly("junit:junit:4.13.2")

testImplementation(Deps.Libs.kotlinCoroutinesCore())
}
Expand All @@ -40,4 +40,4 @@ tasks {

base {
archivesBaseName = "mockk"
}
}
Expand Up @@ -52,8 +52,8 @@ class JvmConfigurationPlugin : Plugin<Project> {

private fun Project.configureJavaPlugin() {
extensions.configure(JavaPluginExtension::class) {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
tasks {
named<Test>("test") {
Expand Down
Expand Up @@ -6,12 +6,12 @@ fun Project.kotlinVersion() = findProperty("kotlin.version")?.toString() ?: Deps

object Deps {
object Versions {
const val androidTools = "4.1.1"
const val dokka = "1.6.0"
const val kotlinDefault = "1.6.0"
const val androidTools = "7.2.0"
const val dokka = "1.6.21"
const val kotlinDefault = "1.6.21"
const val coroutines = "1.3.3"
const val slfj = "1.7.32"
const val logback = "1.2.10"
const val logback = "1.2.11"
const val junitJupiter = "5.8.2"
const val junitVintage = "5.8.2"
}
Expand Down