move all source files to library

This commit is contained in:
Sean Mac Gillicuddy 2019-09-27 13:53:42 +01:00
parent a9f1f8ef7b
commit 7e46a27840
234 changed files with 457 additions and 120 deletions

View File

@ -47,115 +47,6 @@ repositories {
String[] archs = ['arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64']
dependencies {
implementation project(":core")
// use jdk8 java.time backport, as long app < Build.VERSION_CODES.O
implementation("com.jakewharton.threetenabp:threetenabp:1.1.1")
// Get kiwixlib online if it is not populated locally
if (!shouldUseLocalVersion()) {
implementation 'org.kiwix.kiwixlib:kiwixlib:8.1.0'
} else {
implementation 'com.getkeepsafe.relinker:relinker:1.3.1'
implementation fileTree(include: ['*.aar'], dir: 'libs')
}
// Android Support
implementation "androidx.appcompat:appcompat:$appCompatVersion"
implementation "com.google.android.material:material:$materialVersion"
implementation "androidx.cardview:cardview:$cardViewVersion"
implementation "androidx.multidex:multidex:$multidexVersion"
implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion"
implementation "androidx.core:core-ktx:1.0.2"
implementation "androidx.fragment:fragment-ktx:1.0.0"
implementation "androidx.collection:collection-ktx:1.1.0"
androidTestImplementation("androidx.test.espresso:espresso-core:$espressoVersion")
androidTestImplementation "androidx.test.espresso:espresso-web:$espressoVersion"
androidTestImplementation "androidx.test.espresso:espresso-intents:$espressoVersion"
androidTestImplementation("com.schibsted.spain:barista:$baristaVersion") {
exclude group: "com.android.support.test.uiautomator"
}
androidTestImplementation("androidx.test.espresso:espresso-contrib:$espressoVersion")
androidTestImplementation "androidx.annotation:annotation:$annotationVersion"
androidTestImplementation "androidx.test.ext:junit:1.1.1"
androidTestImplementation "androidx.test:runner:1.2.0"
androidTestImplementation "androidx.test:rules:1.2.0"
androidTestImplementation "androidx.test:core:1.2.0"
androidTestImplementation "com.squareup.okhttp3:mockwebserver:3.6.0"
androidTestUtil 'androidx.test:orchestrator:1.1.0'
// Mockito
androidTestImplementation "org.mockito:mockito-android:$mockitoVersion"
// Tab indicator
implementation "com.pacioianu.david:ink-page-indicator:$inkPageIndicatorVersion"
// Dagger
compileOnly "javax.annotation:javax.annotation-api:$javaxAnnotationVersion"
androidTestCompileOnly "javax.annotation:javax.annotation-api:$javaxAnnotationVersion"
implementation "com.google.dagger:dagger:$daggerVersion"
implementation "com.google.dagger:dagger-android:$daggerVersion"
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
kapt "com.google.dagger:dagger-android-processor:$daggerVersion"
kaptAndroidTest "com.google.dagger:dagger-compiler:$daggerVersion"
// SquiDB
implementation 'com.yahoo.squidb:squidb:2.0.0'
implementation 'com.yahoo.squidb:squidb-annotations:2.0.0'
kapt 'com.yahoo.squidb:squidb-processor:2.0.0'
// Square
implementation "com.squareup.okhttp3:okhttp:$okHttpVersion"
implementation "com.squareup.okhttp3:logging-interceptor:$okHttpVersion"
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
implementation("com.squareup.retrofit2:converter-simplexml:$retrofitVersion") {
exclude group: "xpp3", module: "xpp3"
exclude group: "stax", module: "stax-api"
exclude group: "stax", module: "stax"
}
// ButterKnife
implementation "com.jakewharton:butterknife:$butterKnifeVersion"
kapt "com.jakewharton:butterknife-compiler:$butterKnifeVersion"
// RxJava
implementation "io.reactivex.rxjava2:rxandroid:$rxAndroidVersion"
implementation "io.reactivex.rxjava2:rxjava:$rxJavaVersion"
// Leak canary
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0-alpha-2'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
implementation "android.arch.lifecycle:extensions:1.1.1"
implementation "io.objectbox:objectbox-kotlin:$objectboxVersion"
implementation "io.objectbox:objectbox-rxjava:$objectboxVersion"
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation "androidx.tonyodev.fetch2:xfetch2:$fetchVersion"
implementation "androidx.tonyodev.fetch2okhttp:xfetch2okhttp:$fetchVersion"
testImplementation "org.junit.jupiter:junit-jupiter:5.4.2"
testImplementation "io.mockk:mockk:1.9"
testImplementation "org.assertj:assertj-core:3.11.1"
testImplementation 'com.jraska.livedata:testing-ktx:1.1.0'
testImplementation 'androidx.arch.core:core-testing:2.0.1'
androidTestImplementation "io.mockk:mockk-android:1.9"
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
androidTestImplementation "org.assertj:assertj-core:3.11.1"
androidTestImplementation("org.simpleframework:simple-xml:2.7.1") {
exclude module: 'stax'
exclude module: 'stax-api'
exclude module: 'xpp3'
}
}
private boolean shouldUseLocalVersion() {
file("./libs").exists()
}
// Set custom app import directory
def map = [:]
def custom = new File("app/src")
@ -529,3 +420,32 @@ apply from: "${rootDir}/team-props/git-hooks.gradle"
afterEvaluate {
tasks['preBuild'].dependsOn installGitHooks
}
dependencies {
implementation project(":core")
androidTestImplementation("androidx.test.espresso:espresso-core:$espressoVersion")
androidTestImplementation "androidx.test.espresso:espresso-web:$espressoVersion"
androidTestImplementation "androidx.test.espresso:espresso-intents:$espressoVersion"
androidTestImplementation("com.schibsted.spain:barista:$baristaVersion") {
exclude group: "com.android.support.test.uiautomator"
}
androidTestImplementation("androidx.test.espresso:espresso-contrib:$espressoVersion")
androidTestImplementation "androidx.annotation:annotation:$annotationVersion"
androidTestImplementation "androidx.test.ext:junit:1.1.1"
androidTestImplementation "androidx.test:runner:1.2.0"
androidTestImplementation "androidx.test:rules:1.2.0"
androidTestImplementation "androidx.test:core:1.2.0"
androidTestImplementation "com.squareup.okhttp3:mockwebserver:3.6.0"
androidTestUtil 'androidx.test:orchestrator:1.1.0'
androidTestImplementation "org.mockito:mockito-android:$mockitoVersion"
androidTestCompileOnly "javax.annotation:javax.annotation-api:$javaxAnnotationVersion"
kaptAndroidTest "com.google.dagger:dagger-compiler:$daggerVersion"
androidTestImplementation "io.mockk:mockk-android:1.9"
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
androidTestImplementation "org.assertj:assertj-core:3.11.1"
androidTestImplementation("org.simpleframework:simple-xml:2.7.1") {
exclude module: 'stax'
exclude module: 'stax-api'
exclude module: 'xpp3'
}
}

View File

@ -1,14 +1,38 @@
buildscript {
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:$androidGradlePluginVersion"
classpath "org.apache.httpcomponents:httpclient-android:4.3.3"
classpath "com.testdroid:testdroid-api:2.71"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "io.objectbox:objectbox-gradle-plugin:$objectboxVersion"
classpath "org.jlleitschuh.gradle:ktlint-gradle:8.2.0"
}
}
plugins {
id("checkstyle")
id("com.github.triplet.play") version("2.4.1")
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'io.objectbox'
apply plugin: 'jacoco-android'
apply plugin: "org.jlleitschuh.gradle.ktlint"
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
compileSdkVersion 28
defaultConfig {
minSdkVersion 15
targetSdkVersion 29
targetSdkVersion 28
versionCode 1
versionName "1.0"
@ -24,12 +48,99 @@ android {
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.core:core-ktx:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
jacoco {
toolVersion = "0.8.3"
}
tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
}
ktlint {
android = true
}
private boolean shouldUseLocalVersion() {
file("./libs").exists()
}
dependencies {
// use jdk8 java.time backport, as long app < Build.VERSION_CODES.O
implementation("com.jakewharton.threetenabp:threetenabp:1.1.1")
// Get kiwixlib online if it is not populated locally
if (!shouldUseLocalVersion()) {
implementation 'org.kiwix.kiwixlib:kiwixlib:8.1.0'
} else {
implementation 'com.getkeepsafe.relinker:relinker:1.3.1'
implementation fileTree(include: ['*.aar'], dir: 'libs')
}
// Android Support
implementation "androidx.appcompat:appcompat:$appCompatVersion"
implementation "com.google.android.material:material:$materialVersion"
implementation "androidx.cardview:cardview:$cardViewVersion"
implementation "androidx.multidex:multidex:$multidexVersion"
implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion"
implementation "androidx.core:core-ktx:1.0.2"
implementation "androidx.fragment:fragment-ktx:1.0.0"
implementation "androidx.collection:collection-ktx:1.1.0"
// Tab indicator
implementation "com.pacioianu.david:ink-page-indicator:$inkPageIndicatorVersion"
// Dagger
compileOnly "javax.annotation:javax.annotation-api:$javaxAnnotationVersion"
implementation "com.google.dagger:dagger:$daggerVersion"
implementation "com.google.dagger:dagger-android:$daggerVersion"
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
kapt "com.google.dagger:dagger-android-processor:$daggerVersion"
// SquiDB
implementation 'com.yahoo.squidb:squidb:2.0.0'
implementation 'com.yahoo.squidb:squidb-annotations:2.0.0'
kapt 'com.yahoo.squidb:squidb-processor:2.0.0'
// Square
implementation "com.squareup.okhttp3:okhttp:$okHttpVersion"
implementation "com.squareup.okhttp3:logging-interceptor:$okHttpVersion"
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
implementation("com.squareup.retrofit2:converter-simplexml:$retrofitVersion") {
exclude group: "xpp3", module: "xpp3"
exclude group: "stax", module: "stax-api"
exclude group: "stax", module: "stax"
}
// ButterKnife
implementation "com.jakewharton:butterknife:$butterKnifeVersion"
kapt "com.jakewharton:butterknife-compiler:$butterKnifeVersion"
// RxJava
implementation "io.reactivex.rxjava2:rxandroid:$rxAndroidVersion"
implementation "io.reactivex.rxjava2:rxjava:$rxJavaVersion"
// Leak canary
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0-alpha-2'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
implementation "android.arch.lifecycle:extensions:1.1.1"
implementation "io.objectbox:objectbox-kotlin:$objectboxVersion"
implementation "io.objectbox:objectbox-rxjava:$objectboxVersion"
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation "androidx.tonyodev.fetch2:xfetch2:$fetchVersion"
implementation "androidx.tonyodev.fetch2okhttp:xfetch2okhttp:$fetchVersion"
testImplementation "org.junit.jupiter:junit-jupiter:5.4.2"
testImplementation "io.mockk:mockk:1.9"
testImplementation "org.assertj:assertj-core:3.11.1"
testImplementation 'com.jraska.livedata:testing-ktx:1.1.0'
testImplementation 'androidx.arch.core:core-testing:2.0.1'
}

View File

@ -0,0 +1,306 @@
{
"_note1": "KEEP THIS FILE! Check it into a version control system (VCS) like git.",
"_note2": "ObjectBox manages crucial IDs for your object model. See docs for details.",
"_note3": "If you have VCS merge conflicts, you must resolve them according to ObjectBox docs.",
"entities": [
{
"id": "1:6753828318238182169",
"lastPropertyId": "7:3128489550854576662",
"name": "BookmarkEntity",
"properties": [
{
"id": "1:4161436990554106868",
"name": "id"
},
{
"id": "2:5430277112220866075",
"name": "zimId"
},
{
"id": "3:1920555868115455283",
"name": "zimName"
},
{
"id": "4:1144021314405592979",
"name": "zimFilePath"
},
{
"id": "5:1201306839176185409",
"name": "bookmarkUrl"
},
{
"id": "6:8433461738636232858",
"name": "bookmarkTitle"
},
{
"id": "7:3128489550854576662",
"name": "favicon"
}
],
"relations": []
},
{
"id": "2:4490764678780564858",
"lastPropertyId": "15:3413905867261761813",
"name": "BookOnDiskEntity",
"properties": [
{
"id": "1:1061613890858593489",
"name": "id"
},
{
"id": "2:8161106160071793904",
"name": "file"
},
{
"id": "3:9093824958600950015",
"name": "bookId"
},
{
"id": "4:4546737576062737631",
"name": "title"
},
{
"id": "5:8862476730041195780",
"name": "description"
},
{
"id": "6:1643414230498372207",
"name": "language"
},
{
"id": "7:4256102149480321263",
"name": "creator"
},
{
"id": "8:8617188167786711871",
"name": "publisher"
},
{
"id": "9:1538356380641793639",
"name": "date"
},
{
"id": "10:3657215187282848783",
"name": "url"
},
{
"id": "11:2885051601733430036",
"name": "articleCount"
},
{
"id": "12:976377815584639565",
"name": "mediaCount"
},
{
"id": "13:8259964219413704009",
"name": "size"
},
{
"id": "14:3416475199984272265",
"name": "name"
},
{
"id": "15:3413905867261761813",
"name": "favIcon"
}
],
"relations": []
},
{
"id": "3:4667445053417046696",
"lastPropertyId": "22:3612541570525158748",
"name": "FetchDownloadEntity",
"properties": [
{
"id": "1:6372874649909657573",
"name": "id"
},
{
"id": "2:2089916434537520820",
"name": "downloadId"
},
{
"id": "3:7878374882309235035",
"name": "file"
},
{
"id": "4:7502035812863980820",
"name": "etaInMilliSeconds"
},
{
"id": "5:7082451686785318588",
"name": "bytesDownloaded"
},
{
"id": "6:7113010323308947719",
"name": "totalSizeOfDownload"
},
{
"id": "7:2175015220661329803",
"name": "status"
},
{
"id": "8:4813100033324463036",
"name": "error"
},
{
"id": "9:8982495993806231454",
"name": "progress"
},
{
"id": "10:3926962488486060158",
"name": "bookId"
},
{
"id": "11:129028853020084102",
"name": "title"
},
{
"id": "12:7649234952528792108",
"name": "description"
},
{
"id": "13:3331979845126911294",
"name": "language"
},
{
"id": "14:6321340624605529974",
"name": "creator"
},
{
"id": "15:5943661413796894632",
"name": "publisher"
},
{
"id": "16:7411386685592999131",
"name": "date"
},
{
"id": "17:4482641204999320733",
"name": "url"
},
{
"id": "18:5551755383056884979",
"name": "articleCount"
},
{
"id": "19:9166139929690883082",
"name": "mediaCount"
},
{
"id": "20:1678771292184209114",
"name": "size"
},
{
"id": "21:376908373393114092",
"name": "name"
},
{
"id": "22:3612541570525158748",
"name": "favIcon"
}
],
"relations": []
},
{
"id": "4:7336993720149839651",
"lastPropertyId": "9:5115284274427977928",
"name": "HistoryEntity",
"properties": [
{
"id": "1:5956546639888621551",
"name": "id"
},
{
"id": "2:2492463281201306431",
"name": "zimId"
},
{
"id": "3:9097063218884668504",
"name": "zimName"
},
{
"id": "4:3861054699694567509",
"name": "zimFilePath"
},
{
"id": "5:1508033661073876604",
"name": "favicon"
},
{
"id": "6:4363787385254163443",
"name": "historyUrl"
},
{
"id": "7:4973295411936500015",
"name": "historyTitle"
},
{
"id": "8:9030991786773360744",
"name": "dateString"
},
{
"id": "9:5115284274427977928",
"name": "timeStamp"
}
],
"relations": []
},
{
"id": "5:1698071478617691970",
"lastPropertyId": "4:8081039079017259159",
"name": "LanguageEntity",
"properties": [
{
"id": "1:4711228976917084703",
"name": "id"
},
{
"id": "2:8634502303062351259",
"name": "locale"
},
{
"id": "3:432873823841868034",
"name": "active"
},
{
"id": "4:8081039079017259159",
"name": "occurencesOfLanguage"
}
],
"relations": []
},
{
"id": "6:5403414312530983220",
"lastPropertyId": "3:8277280583050158288",
"name": "RecentSearchEntity",
"properties": [
{
"id": "1:1750736042065595617",
"name": "id"
},
{
"id": "2:7978377415446934841",
"name": "searchTerm"
},
{
"id": "3:8277280583050158288",
"name": "zimId"
}
],
"relations": []
}
],
"lastEntityId": "6:5403414312530983220",
"lastIndexId": "0:0",
"lastRelationId": "0:0",
"lastSequenceId": "0:0",
"modelVersion": 4,
"modelVersionParserMinimum": 4,
"retiredEntityUids": [],
"retiredIndexUids": [],
"retiredPropertyUids": [],
"retiredRelationUids": [],
"version": 1
}

Some files were not shown because too many files have changed in this diff Show More