blob: c7de868f223c071a37f81daf63b6108420260929 [file] [log] [blame]
// The Android Gradle Plugin builds the native code with the Android NDK.
group = "com.example.ok_http"
version = "1.0"
buildscript {
// Required to support `okhttp:4.12.0`.
ext.kotlin_version = '1.9.23'
repositories {
google()
mavenCentral()
}
dependencies {
// The Android Gradle Plugin knows how to build native code with the NDK.
classpath("com.android.tools.build:gradle:7.3.0")
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
rootProject.allprojects {
repositories {
google()
mavenCentral()
}
}
apply plugin: "com.android.library"
apply plugin: 'kotlin-android'
android {
if (project.android.hasProperty("namespace")) {
namespace = "com.example.ok_http"
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
// Bumping the plugin compileSdk version requires all clients of this plugin
// to bump the version in their app.
compileSdk = 34
// Use the NDK version
// declared in /android/app/build.gradle file of the Flutter project.
// Replace it with a version number if this plugin requires a specific NDK version.
// (e.g. ndkVersion "23.1.7779620")
ndkVersion = android.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
defaultConfig {
minSdk = 21
}
}
dependencies {
implementation('com.squareup.okhttp3:okhttp:4.12.0')
}