Skip to content
This repository was archived by the owner on Nov 24, 2020. It is now read-only.

Commit 5f48648

Browse files
add default implementation of Calls interface on Android KT target - For Unit tests mocking reasons
1 parent 12c08c9 commit 5f48648

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/target/kt_android.cr

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ END
6161
"callback: (error: Error?, result: Boolean?) -> Unit"
6262
end
6363
@io << ident(String.build do |io|
64-
io << " fun #{mangle op.pretty_name}(#{args.join(", ")}) \n"
64+
io << " fun #{mangle op.pretty_name}(#{args.join(", ")}) { \n"
65+
io << " callback(Error(ErrorType.Fatal, \"Not Implemented\"), null) \n"
66+
io << " }\n"
6567
end)
6668
end
6769
@io << <<-END

target-android/api/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies {
2424
implementation fileTree(dir: 'libs', include: ['*.jar'])
2525
api 'com.squareup.okhttp3:okhttp:3.10.0'
2626
api 'com.anupcowkur:reservoir:3.1.0'
27-
}
27+
}`
2828

2929
publishing {
3030
repositories {

0 commit comments

Comments
 (0)