Skip to content

Commit

Permalink
Merge pull request #899 from aSemy/fix/894-missing-android-dispatcher…
Browse files Browse the repository at this point in the history
…-jar

Fix Android Instrumentation dispatcher.jar inclusion
  • Loading branch information
Raibaz committed Aug 25, 2022
2 parents 0e9e346 + ba57991 commit fe36b92
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions modules/mockk-agent-android/build.gradle.kts
Expand Up @@ -23,7 +23,7 @@ android {
sourceSets {
named("main").configure {
resources {
srcDirs(dispatcherJarResPath)
srcDirs({ packageDispatcherJar.map { it.destinationDirectory } })
}
}
}
Expand Down Expand Up @@ -60,13 +60,11 @@ dependencies {
androidClassesDex(projects.modules.mockkAgentAndroidDispatcher)
}

val dispatcherJarResPath: Provider<Directory> = layout.buildDirectory.dir("generated/dispatcher-jar")

val packageDispatcherJar by tasks.registering(Jar::class) {
group = LifecycleBasePlugin.BUILD_GROUP
from(androidClassesDex.asFileTree)
archiveFileName.set("dispatcher.jar")
destinationDirectory.set(dispatcherJarResPath)
destinationDirectory.set(temporaryDir)
}

tasks.preBuild {
Expand Down

0 comments on commit fe36b92

Please sign in to comment.