Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 0 additions & 72 deletions build.gradle

This file was deleted.

72 changes: 72 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/*
* Copyright 2021 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.
*/

import org.jetbrains.dokka.gradle.DokkaTaskPartial

buildscript {
val kotlinVersion by extra("1.6.10")
val dokkaVersion by extra("1.5.30")

repositories {
google()
jcenter()
mavenLocal()
mavenCentral()
maven(url = "https://jitpack.io")
maven(url = "https://s3.amazonaws.com/repo.commonsware.com")
}
dependencies {
classpath("com.android.tools.build:gradle:7.0.4")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
classpath("org.jetbrains.dokka:dokka-gradle-plugin:$dokkaVersion")
}
}

apply(plugin = "org.jetbrains.dokka")

allprojects {
repositories {
google()
jcenter()
mavenLocal()
mavenCentral()
maven(url = "https://jitpack.io")
maven(url = "https://s3.amazonaws.com/repo.commonsware.com")
}
}

subprojects {
tasks.register<Jar>("javadocsJar") {
archiveClassifier.set("javadoc")
}

tasks.register<Jar>("sourcesJar") {
archiveClassifier.set("sources")
from("src/main/java", "src/main/resources")
}
}

tasks.register("clean", Delete::class).configure {
delete(rootProject.buildDir)
}

tasks.register("cleanDocs", Delete::class).configure {
delete("${project.rootDir}/docs/readium", "${project.rootDir}/docs/index.md")
}

tasks.withType<DokkaTaskPartial>().configureEach {
dokkaSourceSets {
configureEach {
reportUndocumented.set(false)
skipEmptyPackages.set(false)
skipDeprecated.set(true)
}
}
}

tasks.named<org.jetbrains.dokka.gradle.DokkaMultiModuleTask>("dokkaGfmMultiModule").configure {
outputDirectory.set(file("${projectDir.path}/docs"))
}
18 changes: 18 additions & 0 deletions gradle/libs.versions.toml2
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Eventually want to use this for dependencies, but Android Studio is not ready

[versions]
kotlin = "1.6.10"
dokka = "1.5.30"
room = "2.4.0"

[libraries]
kotlin-gradle = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
dokka-gradle = { group = "org.jetbrains.dokka", name = "dokka-gradle-plugin", version.ref = "dokka" }
room-runtime = { group = "androidx.room", name = "room-runtime", version.ref = "room" }
room-ktx = { group = "androidx.room", name = "room-ktx", version.ref = "room" }
room-compiler = { group = "androidx.room", name = "room-compiler", version.ref = "room" }

[bundles]
room = ["room-runtime", "room-compiler"]

[plugins]
85 changes: 0 additions & 85 deletions readium/lcp/build.gradle

This file was deleted.

86 changes: 86 additions & 0 deletions readium/lcp/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/*
* 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")
id("kotlin-android")
id("kotlin-parcelize")
id("kotlin-kapt")
id("maven-publish")
id("org.jetbrains.dokka")
}

android {

compileSdk = 31
defaultConfig {
minSdk = 21
targetSdk = 31
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.RequiresOptIn"
allWarningsAsErrors = true
}
buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android.txt"))
}
}
}

afterEvaluate {
publishing {
publications {
create<MavenPublication>("release") {
from(components.getByName("release"))
groupId = "com.github.readium"
artifactId = "readium-lcp"
artifact(tasks.findByName("sourcesJar"))
artifact(tasks.findByName("javadocsJar"))
}
}
}
}

dependencies {
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))

implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2")

api(project(":readium:shared"))

implementation("androidx.constraintlayout:constraintlayout:2.1.2")
implementation("androidx.core:core-ktx:1.7.0")
implementation("com.google.android.material:material:1.4.0")
implementation("com.jakewharton.timber:timber:5.0.1")
implementation("com.mcxiaoke.koi:async:0.5.5") {
exclude(module = "support-v4")
}
implementation("com.mcxiaoke.koi:core:0.5.5") {
exclude(module = "support-v4")
}
implementation("joda-time:joda-time:2.10.13")
implementation("org.zeroturnaround:zt-zip:1.14")
implementation("androidx.browser:browser:1.4.0")

// Room database
val roomVersion = "2.4.0"
implementation("androidx.room:room-runtime:$roomVersion")
implementation("androidx.room:room-ktx:$roomVersion")
kapt("androidx.room:room-compiler:$roomVersion")

// Tests
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.3")
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
}
Loading