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

Build logic improvements #840

Merged
merged 1 commit into from Jul 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 23 additions & 12 deletions agent/jvm/build.gradle
Expand Up @@ -23,20 +23,31 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
}

task copyMockKDispatcher(type: Copy) {
dependsOn compileJava
dependsOn compileKotlin
from "${sourceSets.main.java.outputDir}/io/mockk/proxy/jvm/dispatcher"
into "${sourceSets.main.java.outputDir}/io/mockk/proxy/jvm/dispatcher"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

outputDir is deprecated

include "JvmMockKDispatcher.class"
include "JvmMockKWeakMap.class"
include "JvmMockKWeakMap\$StrongKey.class"
include "JvmMockKWeakMap\$WeakKey.class"
rename { String fileName ->
fileName.replace('.class', '.clazz')
def copyMockKDispatcher =
tasks.register("copyMockKDispatcher", Copy) {
dependsOn compileJava
dependsOn compileKotlin

def mockKDispatcherDir =
sourceSets.main.java.classesDirectory
.map { "$it/io/mockk/proxy/jvm/dispatcher" }

from(mockKDispatcherDir) {
include "JvmMockKDispatcher.class"
include "JvmMockKWeakMap.class"
include "JvmMockKWeakMap\$StrongKey.class"
include "JvmMockKWeakMap\$WeakKey.class"

rename { String fileName ->
fileName.replace('.class', '.clazz')
}
}
into mockKDispatcherDir
}

tasks.named("classes") {
dependsOn copyMockKDispatcher
}
classes.dependsOn(copyMockKDispatcher)

jar {
exclude "io/mockk/proxy/jvm/dispatcher/JvmMockKDispatcher.class"
Expand Down
3 changes: 3 additions & 0 deletions dsl/jvm/api/mockk-dsl-jvm.api
Expand Up @@ -543,6 +543,7 @@ public final class io/mockk/MockKConstructorScope : io/mockk/MockKUnmockKScope {
public final class io/mockk/MockKDsl {
public static final field INSTANCE Lio/mockk/MockKDsl;
public final fun internalCheckExactlyAtMostAtLeast (IIILio/mockk/Ordering;)V
public final fun internalCheckUnnecessaryStub ([Ljava/lang/Object;)V
public final fun internalClearAllMocks (ZZZZZZZZZ)V
public static synthetic fun internalClearAllMocks$default (Lio/mockk/MockKDsl;ZZZZZZZZZILjava/lang/Object;)V
public final fun internalClearConstructorMockk ([Lkotlin/reflect/KClass;ZZZZZ)V
Expand Down Expand Up @@ -756,6 +757,8 @@ public abstract interface class io/mockk/MockKGateway$Stubber {
public abstract interface class io/mockk/MockKGateway$VerificationAcknowledger {
public abstract fun acknowledgeVerified ()V
public abstract fun acknowledgeVerified (Ljava/lang/Object;)V
public abstract fun checkUnnecessaryStub ()V
public abstract fun checkUnnecessaryStub (Ljava/lang/Object;)V
public abstract fun markCallVerified (Lio/mockk/Invocation;)V
}

Expand Down
1 change: 1 addition & 0 deletions gradle.properties
@@ -1,4 +1,5 @@
version=1.12.5-SNAPSHOT
org.gradle.parallel=true
org.gradle.configureondemand=false
org.gradle.jvmargs=-XX:MaxMetaspaceSize=768m
# localrepo=build/mockk-repo
Expand Down
6 changes: 3 additions & 3 deletions gradle/jacoco.gradle
Expand Up @@ -7,8 +7,8 @@ jacoco {
afterEvaluate {
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

enabled is deprecated

xml.required = true
html.required = true
}
afterEvaluate {
classDirectories.from(files(classDirectories.files.collect {
Expand All @@ -23,4 +23,4 @@ afterEvaluate {
}

check.dependsOn jacocoTestReport
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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