chrmelchior
05/26/2023, 8:27 AMandroidUnitTest-androidandroid.os.Build-jvmkotlin {
    sourceSets {
        val commonMain by getting {
            dependencies {
            	// This will pull in library-base-android for both 
                // Android Unit Test and Instrumented Tests
                implementation("io.realm.kotlin:library-base:1.10.0-SNAPSHOT")
            }
        }
        val androidUnitTest by getting {
        	dependencies {
				// Here I need to override the library-base-android variant  
                // with the library-base-jvm dependency.        	
        	}
        }
        val androidInstrumentedTest by getting {
        	dependencies {
				// This should continue to use the library-base-android variant.
        	}
        }
    }	
}configurations.all {
    resolutionStrategy.dependencySubstitution {
    // Ensure that androidUnitTest uses the Realm JVM variant rather than Android.
    if (name == "debugUnitTestRuntimeClasspath") {
        resolutionStrategy.dependencySubstitution {
            substitute(module("io.realm.kotlin:library-base:${Realm.version}")).using(
                module("io.realm.kotlin:library-base-jvm:${Realm.version}")
            )
            substitute(module("io.realm.kotlin:cinterop:${Realm.version}")).using(
                module("io.realm.kotlin:cinterop-jvm:${Realm.version}")
            )
        }
    }
}debugUnitTestRuntimeClasspathorg.gradle.jvm.environmentandroidstandard-jvmorg.jetbrains.kotlin.platform.typejvmandroidJvmandroidUnitTest