This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Injector { | |
func inject() -> String { | |
"testing 123" // simplified inject function | |
} | |
} | |
protocol Injectable { | |
static func inject(_ injector: Injector) -> Self | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Mock Hacks | |
internal object ContextSwizzle { | |
fun swizzle() { | |
ByteBuddyAgent.install() | |
val bridgeContextClass = contextClass() | |
val buddy = ByteBuddy() | |
buddy.redefine(bridgeContextClass) | |
.method( | |
ElementMatchers.named<MethodDescription>("getSystemService") | |
.and(ElementMatchers.takesArguments(String::class.java)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.mtg.api | |
import kotlinx.coroutines.flow.Flow | |
import kotlinx.coroutines.flow.flow | |
import retrofit2.* | |
import java.lang.reflect.ParameterizedType | |
import java.lang.reflect.Type | |
class FlowCallAdapterFactory private constructor() : CallAdapter.Factory() { | |
companion object { |