Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macgills/2.5 downloader #1170

Merged
merged 20 commits into from
May 23, 2019
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
464ddf7
Migrate DownloadFragment to kotlin and integrate with new Downloader
BBT-SeanMacGillicuddy Apr 30, 2019
61697b5
ZimFileSelectFragment rewritten in kotlin and observing reactive stre…
BBT-SeanMacGillicuddy May 1, 2019
41a753a
LibraryFragment converted to Kotlin and observing reactive streams
BBT-SeanMacGillicuddy May 7, 2019
d819352
Convert ZimManageActivity to Kotlin and reactive streams
BBT-SeanMacGillicuddy May 9, 2019
f318da9
Delete duplicate dialog, format and clean up PagerAdapter, languageVi…
BBT-SeanMacGillicuddy May 9, 2019
287d816
Downloads now fully support states from a Query. Language handling im…
BBT-SeanMacGillicuddy May 10, 2019
e86b3ef
Bump version name/number
BBT-SeanMacGillicuddy May 13, 2019
e577339
Move check on adding a download pre db insertion. Handle downloads ca…
BBT-SeanMacGillicuddy May 13, 2019
73690fb
Add fat32 checker that checks on storage change and on deletion/file …
BBT-SeanMacGillicuddy May 14, 2019
2d19903
Show downloads tab when notification is clicked on
BBT-SeanMacGillicuddy May 15, 2019
0503d72
poll for external storage permission before checking file system
BBT-SeanMacGillicuddy May 15, 2019
5b01c30
Migrate from to new Model for BookDatabaseEntity
BBT-SeanMacGillicuddy May 15, 2019
6e33ae2
Remove multidex as not needed without guava/apache, upgrade leakcanar…
BBT-SeanMacGillicuddy May 15, 2019
4370ee6
Revert "Remove multidex as not needed without guava/apache, upgrade l…
BBT-SeanMacGillicuddy May 15, 2019
ed6a632
Redo upgrade of leakcanary, leakcanary 2.0 has androidx dependencies …
BBT-SeanMacGillicuddy May 15, 2019
9a3d44b
Fix bug when a null book is found on storage
BBT-SeanMacGillicuddy May 15, 2019
a892668
Add new objectbox databases and replace usages of old dbs. Use Kapt f…
BBT-SeanMacGillicuddy May 17, 2019
fd31d39
revert to original dao/schemas prior to writing migration
BBT-SeanMacGillicuddy May 17, 2019
75c4705
Create migration for DB, up DB version. Delete Unused methods and mar…
BBT-SeanMacGillicuddy May 17, 2019
aa01598
Fix padding of abbpar for ZimManageActivity. Stop creating unused tab…
BBT-SeanMacGillicuddy May 20, 2019
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ glassify
.project
.classpath

.vscode
.vscode
captures/
42 changes: 19 additions & 23 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ buildscript {
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'checkstyle'
apply plugin: 'testdroid'
apply plugin: 'io.objectbox'

repositories {
mavenCentral()
Expand All @@ -29,7 +31,6 @@ repositories {
}

String[] archs = ['arm64-v8a', 'armeabi', 'mips', 'mips64', 'x86', 'x86_64']

dependencies {

// Get kiwixlib online if it is not populated locally
Expand All @@ -49,9 +50,6 @@ dependencies {
implementation "com.android.support:support-v4:$supportLibraryVersion"
implementation "com.android.support:design:$supportLibraryVersion"
implementation "com.android.support:cardview-v7:$supportLibraryVersion"
implementation 'com.android.support:multidex:1.0.2'

compile 'com.android.support.constraint:constraint-layout:1.0.2'

androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'

Expand All @@ -77,25 +75,19 @@ dependencies {
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test:rules:1.0.1'

// Guava
implementation group: 'com.google.guava', name: 'guava', version: '21.0'

// 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"
annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
annotationProcessor "com.google.dagger:dagger-android-processor:$daggerVersion"
androidTestAnnotationProcessor "com.google.dagger:dagger-compiler:$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'
annotationProcessor 'com.yahoo.squidb:squidb-processor:2.0.0'

// Apache
implementation 'commons-io:commons-io:2.5'
kapt 'com.yahoo.squidb:squidb-processor:2.0.0'

// Square
implementation "com.squareup.okhttp3:okhttp:$okHttpVersion"
Expand All @@ -111,7 +103,7 @@ dependencies {

// Butterknife
implementation 'com.jakewharton:butterknife:8.0.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.0.1'
kapt 'com.jakewharton:butterknife-compiler:8.0.1'

// RxJava
implementation "io.reactivex.rxjava2:rxandroid:$rxAndroidVersion"
Expand All @@ -126,7 +118,7 @@ dependencies {
androidTestImplementation "org.mockito:mockito-android:2.24.5"

// Leak canary
implementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
implementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.3'
// Only enable leak canary in debug builds
configurations.all { config ->
if (config.name.contains('debug') || config.name.contains("Debug")) {
Expand All @@ -140,6 +132,10 @@ dependencies {
}
}
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation "android.arch.lifecycle:extensions:1.1.1"
implementation "io.objectbox:objectbox-kotlin:$objectboxVersion"
implementation "io.objectbox:objectbox-rxjava:$objectboxVersion"
}

// Set custom app import directory
Expand All @@ -165,12 +161,11 @@ android {
compileSdkVersion 27

defaultConfig {
minSdkVersion 14
minSdkVersion 15
targetSdkVersion 27
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// See https://github.com/linkedin/dexmaker/issues/65 for why we need the following line.
testInstrumentationRunnerArguments.notClass = 'com.android.dex.DexIndexOverflowException'
multiDexEnabled true
mhutti1 marked this conversation as resolved.
Show resolved Hide resolved
vectorDrawables.useSupportLibrary = true
}

Expand Down Expand Up @@ -204,8 +199,6 @@ android {
buildConfigField "boolean", "KIWIX_ERROR_ACTIVITY", "false"
// True breaks local variables being shown in breakpoints
testCoverageEnabled false
// Needed for instrumentation tests on Pre 5.0
multiDexKeepProguard file('multidex-instrumentation-config.pro')
}

mock_network {
Expand Down Expand Up @@ -252,12 +245,12 @@ android {
def version_code = project.property('version_code')
versionCode version_code.toInteger()
} else {
versionCode 55
versionCode 56
}
if (project.hasProperty('version_name')) {
versionName project.property('version_name')
} else {
versionName "2.4"
versionName "2.5"
}
}
// Custom apps built from a json file, zim file and icon set
Expand Down Expand Up @@ -368,6 +361,9 @@ android {
}
}
*/
androidExtensions {
experimental = true
}
}

// Testdroid deployment configuration
Expand Down
203 changes: 203 additions & 0 deletions app/objectbox-models/default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
{
"_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:7257718270326155947",
"lastPropertyId": "17:8085320504542486236",
"name": "DownloadEntity",
"properties": [
{
"id": "1:2266566996008201697",
"name": "id"
},
{
"id": "2:1953917250527765737",
"name": "downloadId"
},
{
"id": "5:6575412958851693470",
"name": "bookId"
},
{
"id": "6:1075612111256674117",
"name": "title"
},
{
"id": "7:2831524841121029990",
"name": "description"
},
{
"id": "8:2334902404590133038",
"name": "language"
},
{
"id": "9:5087250349738158996",
"name": "creator"
},
{
"id": "10:6128960350043895299",
"name": "publisher"
},
{
"id": "11:3850323036475883785",
"name": "date"
},
{
"id": "12:5288623325038033644",
"name": "url"
},
{
"id": "13:2501711400901908648",
"name": "articleCount"
},
{
"id": "14:3550975911715416030",
"name": "mediaCount"
},
{
"id": "15:8949996430663588693",
"name": "size"
},
{
"id": "16:7554483297276446029",
"name": "name"
},
{
"id": "17:8085320504542486236",
"name": "favIcon"
}
],
"relations": []
},
{
"id": "3:5536749840871435068",
"lastPropertyId": "16:6142333908132117423",
"name": "BookOnDiskEntity",
"properties": [
{
"id": "1:4248832782795400383",
"name": "id"
},
{
"id": "2:2644395282642821815",
"name": "file"
},
{
"id": "4:3145196313443812205",
"name": "bookId"
},
{
"id": "5:597997298666253723",
"name": "title"
},
{
"id": "6:8028706022307902131",
"name": "description"
},
{
"id": "7:4257578632233656657",
"name": "language"
},
{
"id": "8:7771231471515752814",
"name": "creator"
},
{
"id": "9:892859866782486178",
"name": "publisher"
},
{
"id": "10:1925365063061602631",
"name": "date"
},
{
"id": "11:1111395522977944209",
"name": "url"
},
{
"id": "12:3765116904492031525",
"name": "articleCount"
},
{
"id": "13:5901922417972273396",
"name": "mediaCount"
},
{
"id": "14:1229023184984372602",
"name": "size"
},
{
"id": "15:6851856791814492874",
"name": "name"
},
{
"id": "16:6142333908132117423",
"name": "favIcon"
}
],
"relations": []
},
{
"id": "4:6278838675135543734",
"lastPropertyId": "4:8812214350305159407",
"name": "LanguageEntity",
"properties": [
{
"id": "1:7795244654012809404",
"name": "id"
},
{
"id": "2:9116495537035444904",
"name": "locale"
},
{
"id": "3:452531964346972307",
"name": "active"
},
{
"id": "4:8812214350305159407",
"name": "occurencesOfLanguage"
}
],
"relations": []
}
],
"lastEntityId": "4:6278838675135543734",
"lastIndexId": "4:4868787482832538530",
"lastRelationId": "0:0",
"lastSequenceId": "0:0",
"modelVersion": 4,
"modelVersionParserMinimum": 4,
"retiredEntityUids": [
349148274283701276
],
"retiredIndexUids": [
1293695782925933448,
3655049272366703856,
7576716732364166705,
4868787482832538530
],
"retiredPropertyUids": [
4712434661554562781,
1521665545502891268,
1831899651198481824,
8913656606098213241,
4745760836781949968,
9177466730609383913,
6985467229796102081,
4417830652027770707,
3485079785941052658,
2875347328622347138,
96906195091428769,
305997162787053035,
8804682238892773896,
3464301918251637220,
5620508895870653354,
7273406943564025911,
428251106490095982
],
"retiredRelationUids": [],
"version": 1
}
Loading