122 lines
3.8 KiB
Kotlin
122 lines
3.8 KiB
Kotlin
plugins {
|
|
id("com.android.application")
|
|
id("org.jetbrains.kotlin.android")
|
|
id("kotlin-kapt")
|
|
id("kotlin-parcelize")
|
|
}
|
|
|
|
android {
|
|
namespace = "com.rajat.sample.pdfviewer"
|
|
|
|
compileSdk = 34
|
|
|
|
defaultConfig {
|
|
applicationId = "com.rajat.sample.pdfviewer"
|
|
minSdk = 21
|
|
targetSdk = 34
|
|
versionCode = 2
|
|
versionName = "1.1"
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
vectorDrawables {
|
|
useSupportLibrary = true
|
|
}
|
|
}
|
|
|
|
buildFeatures {
|
|
viewBinding = true
|
|
compose = true
|
|
}
|
|
|
|
kotlin {
|
|
jvmToolchain(17)
|
|
}
|
|
|
|
composeOptions {
|
|
kotlinCompilerExtensionVersion = "1.5.4"
|
|
}
|
|
|
|
buildTypes {
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
}
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "1.8"
|
|
}
|
|
|
|
packaging {
|
|
resources {
|
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
|
|
val kotlin_version = "1.9.21"
|
|
implementation(kotlin("stdlib"))
|
|
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
|
|
implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version")
|
|
implementation("androidx.core:core-ktx:1.12.0")
|
|
implementation("androidx.appcompat:appcompat:1.6.1")
|
|
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
|
|
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
|
|
implementation(platform("androidx.compose:compose-bom:2023.03.00"))
|
|
implementation("androidx.compose.ui:ui-graphics")
|
|
testImplementation("junit:junit:4.13.2")
|
|
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
|
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
|
|
implementation(project(":pdfViewer"))
|
|
// implementation("io.github.afreakyelf:Pdf-Viewer:2.1.1")
|
|
testImplementation("androidx.test:core:1.5.0")
|
|
androidTestImplementation("androidx.test:runner:1.5.2")
|
|
androidTestImplementation("androidx.test:rules:1.5.0")
|
|
androidTestImplementation("androidx.test.ext:junit-ktx:1.1.5")
|
|
|
|
implementation("androidx.recyclerview:recyclerview:1.3.2") // Check for the latest version available
|
|
|
|
// compose
|
|
implementation(platform("androidx.compose:compose-bom:2023.10.01"))
|
|
androidTestImplementation(platform("androidx.compose:compose-bom:2023.10.01"))
|
|
|
|
// Choose one of the following:
|
|
// Material Design 3
|
|
implementation("androidx.compose.material3:material3")
|
|
// or Material Design 2
|
|
implementation("androidx.compose.material:material")
|
|
// or skip Material Design and build directly on top of foundational components
|
|
implementation("androidx.compose.foundation:foundation")
|
|
// or only import the main APIs for the underlying toolkit systems,
|
|
// such as input and measurement/layout
|
|
implementation("androidx.compose.ui:ui")
|
|
|
|
// Android Studio Preview support
|
|
implementation("androidx.compose.ui:ui-tooling-preview")
|
|
androidTestImplementation(platform("androidx.compose:compose-bom:2023.10.01"))
|
|
debugImplementation("androidx.compose.ui:ui-tooling")
|
|
|
|
// UI Tests
|
|
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
|
|
debugImplementation("androidx.compose.ui:ui-test-manifest")
|
|
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
|
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
|
|
|
|
|
|
// Optional - Integration with activities
|
|
implementation("androidx.activity:activity-compose:1.8.2")
|
|
|
|
|
|
}
|