| group = "com.example.ok_http" | |
| version = "1.0-SNAPSHOT" | |
| buildscript { | |
| val kotlinVersion = "2.3.20" | |
| repositories { | |
| google() | |
| mavenCentral() | |
| } | |
| dependencies { | |
| classpath("com.android.tools.build:gradle:8.13.1") | |
| classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") | |
| } | |
| } | |
| allprojects { | |
| repositories { | |
| google() | |
| mavenCentral() | |
| } | |
| } | |
| plugins { | |
| id("com.android.library") | |
| } | |
| kotlin { | |
| compilerOptions { | |
| jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17 | |
| } | |
| } | |
| val agpMajor = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.substringBefore('.').toInt() | |
| if (agpMajor < 9) { | |
| apply(plugin = "org.jetbrains.kotlin.android") | |
| } | |
| android { | |
| namespace = "com.example.ok_http" | |
| compileSdk = flutter.compileSdkVersion | |
| ndkVersion = android.ndkVersion | |
| compileOptions { | |
| sourceCompatibility = JavaVersion.VERSION_17 | |
| targetCompatibility = JavaVersion.VERSION_17 | |
| } | |
| defaultConfig { | |
| minSdk = 24 | |
| consumerProguardFiles("proguard.txt") | |
| } | |
| } | |
| kotlin { | |
| compilerOptions { | |
| jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17 | |
| } | |
| } | |
| dependencies { | |
| implementation("com.squareup.okhttp3:okhttp:4.12.0") | |
| } |