forked from readium/kotlin-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
93 lines (82 loc) · 2.94 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/*
* Copyright 2018 Readium Foundation. All rights reserved.
* Use of this source code is governed by the BSD-style license
* available in the top-level LICENSE file of the project.
*/
plugins {
id("com.android.library")
kotlin("android")
kotlin("plugin.parcelize")
kotlin("plugin.serialization")
}
android {
// FIXME: This doesn't pass the lint because some resources don't start with readium_ yet. We need to rename all resources for the next major version.
// resourcePrefix "readium_"
compileSdk = 33
defaultConfig {
minSdk = 21
targetSdk = 33
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=org.readium.r2.shared.InternalReadiumApi"
)
}
testOptions {
unitTests.isIncludeAndroidResources = true
}
buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android.txt"))
}
}
buildFeatures {
viewBinding = true
}
namespace = "org.readium.r2.navigator"
}
rootProject.ext["publish.artifactId"] = "readium-navigator"
apply(from = "$rootDir/scripts/publish-module.gradle")
dependencies {
api(project(":readium:readium-shared"))
implementation(files("libs/PhotoView-2.3.0.jar"))
implementation(libs.androidx.activity.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.browser)
implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.core)
implementation(libs.androidx.fragment.ktx)
implementation(libs.androidx.legacy.ui)
implementation(libs.androidx.legacy.v4)
implementation(libs.bundles.lifecycle)
implementation(libs.androidx.recyclerview)
implementation(libs.androidx.media)
implementation(libs.androidx.viewpager2)
implementation(libs.androidx.webkit)
// Needed to avoid a crash with API 31, see https://stackoverflow.com/a/69152986/1474476
implementation("androidx.work:work-runtime-ktx:2.7.1")
implementation(libs.bundles.media2)
// ExoPlayer is used by the Audio Navigator.
api(libs.bundles.exoplayer)
implementation(libs.google.material)
implementation(libs.timber)
implementation(libs.joda.time)
implementation(libs.bundles.coroutines)
implementation(libs.kotlinx.serialization.json)
implementation(libs.jsoup)
// Tests
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.ext.junit)
androidTestImplementation(libs.androidx.expresso.core)
testImplementation(libs.kotlin.junit)
testImplementation(libs.kotlinx.coroutines.test)
testImplementation(libs.robolectric)
}