build.gradle 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. plugins {
  2. id "com.android.application"
  3. id "org.jetbrains.kotlin.android"
  4. }
  5. def grammarApiBaseUrl = project.findProperty("grammarApiBaseUrl") ?: "http://aimanyi.top"
  6. def ttsEndpointUrl = project.findProperty("ttsEndpointUrl") ?: "http://141.140.15.30:8028/generate"
  7. android {
  8. namespace "com.codex.webviewgrammar"
  9. compileSdk 34
  10. defaultConfig {
  11. applicationId "com.codex.webviewgrammar"
  12. minSdk 24
  13. targetSdk 34
  14. versionCode 1
  15. versionName "1.0"
  16. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  17. buildConfigField "String", "GRAMMAR_API_BASE_URL", "\"${grammarApiBaseUrl}\""
  18. buildConfigField "String", "TTS_ENDPOINT", "\"${ttsEndpointUrl}\""
  19. }
  20. buildTypes {
  21. release {
  22. minifyEnabled = false
  23. proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
  24. }
  25. debug {
  26. minifyEnabled = false
  27. }
  28. }
  29. compileOptions {
  30. sourceCompatibility = JavaVersion.VERSION_17
  31. targetCompatibility = JavaVersion.VERSION_17
  32. }
  33. kotlinOptions {
  34. jvmTarget = "17"
  35. }
  36. buildFeatures {
  37. viewBinding = true
  38. buildConfig = true
  39. }
  40. }
  41. dependencies {
  42. implementation "androidx.core:core-ktx:1.13.1"
  43. implementation "androidx.appcompat:appcompat:1.7.0"
  44. implementation "com.google.android.material:material:1.12.0"
  45. implementation "androidx.constraintlayout:constraintlayout:2.1.4"
  46. implementation "androidx.activity:activity-ktx:1.9.2"
  47. implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.8.5"
  48. implementation "com.squareup.okhttp3:okhttp:4.12.0"
  49. implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1"
  50. testImplementation "junit:junit:4.13.2"
  51. androidTestImplementation "androidx.test.ext:junit:1.2.1"
  52. androidTestImplementation "androidx.test.espresso:espresso-core:3.6.1"
  53. }