File tree Expand file tree Collapse file tree 4 files changed +15
-10
lines changed Expand file tree Collapse file tree 4 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,3 @@ migrate_working_dir/
27
27
** /doc /api /
28
28
.dart_tool /
29
29
build /
30
-
31
- # Ignore the JAR files required to generate JNI Bindings
32
- jar /
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ group = "com.example.ok_http"
4
4
version = " 1.0"
5
5
6
6
buildscript {
7
+ // Required to support `okhttp:4.12.0`.
8
+ ext. kotlin_version = ' 1.9.23'
7
9
repositories {
8
10
google()
9
11
mavenCentral()
@@ -12,6 +14,7 @@ buildscript {
12
14
dependencies {
13
15
// The Android Gradle Plugin knows how to build native code with the NDK.
14
16
classpath(" com.android.tools.build:gradle:7.3.0" )
17
+ classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
15
18
}
16
19
}
17
20
Original file line number Diff line number Diff line change @@ -56,3 +56,10 @@ android {
56
56
flutter {
57
57
source = " ../.."
58
58
}
59
+
60
+ dependencies {
61
+ // "com.squareup.okhttp3:okhttp:4.12.0" is only present so that
62
+ // `jnigen` will work. Applications should not include this line.
63
+ // The version should be synced with `pkgs/ok_http/android/build.gradle`.
64
+ implementation(' com.squareup.okhttp3:okhttp:4.12.0' )
65
+ }
Original file line number Diff line number Diff line change 1
- # To regenerate the JNI Bindings, download the OkHttp 4.12.0 JAR file from the Maven Repository
2
- # and place them in 'jar/'.
3
- # https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp/4.12.0
4
- # Then run the command: dart run jnigen --config jnigen.yaml
1
+ # Regenerate the JNI Bindings using: dart run jnigen --config jnigen.yaml
5
2
6
3
summarizer :
7
4
backend : asm
@@ -11,6 +8,10 @@ output:
11
8
path : " lib/src/jni/bindings.dart"
12
9
structure : single_file
13
10
11
+ android_sdk_config :
12
+ add_gradle_deps : true
13
+ android_example : " example/"
14
+
14
15
enable_experiment :
15
16
- " interface_implementation"
16
17
@@ -81,6 +82,3 @@ exclude:
81
82
- " okhttp3.Headers#-deprecated_size"
82
83
- " okhttp3.Dispatcher#-deprecated_executorService"
83
84
- " okhttp3.Cache#-deprecated_directory"
84
-
85
- class_path :
86
- - " jar/okhttp-4.12.0.jar"
You can’t perform that action at this time.
0 commit comments