Skip to content

Commit

Permalink
Merge branch 'googledrive'
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Harrison committed Jun 22, 2021
2 parents 4425eb5 + 4cf9112 commit 1ef1b1b
Show file tree
Hide file tree
Showing 14 changed files with 979 additions and 14 deletions.
21 changes: 20 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,22 @@ android {
premium {
buildConfigField "boolean", "IS_DROPBOX_ENABLED", "true"

buildConfigField "boolean", "IS_GOOGLE_DRIVE_ENABLED", "true"

buildConfigField "String", "VERSION_NAME_SUFFIX", '""'

dimension "store"
}

fdroid {
/*
* Disable Dropbox.
* Disable Dropbox and Google Drive.
* Properties file which contains the required API key is not included with the code.
*/
buildConfigField "boolean", "IS_DROPBOX_ENABLED", "false"

buildConfigField "boolean", "IS_GOOGLE_DRIVE_ENABLED", "false"

buildConfigField "String", "VERSION_NAME_SUFFIX", '" (fdroid)"'

dimension "store"
Expand Down Expand Up @@ -169,6 +173,21 @@ dependencies {

implementation "com.dropbox.core:dropbox-core-sdk:$versions.dropbox_core_sdk"

// Google Drive
// implementation 'com.google.api-client:google-api-client:1.23.0'
// implementation 'com.google.oauth-client:google-oauth-client-jetty:1.23.0'
// implementation 'com.google.apis:google-api-services-drive:v3-rev110-1.23.0'

implementation 'com.google.android.gms:play-services-auth:19.0.0'
// implementation 'com.google.android.gms:play-services-drive:17.0.0'
implementation 'com.google.http-client:google-http-client-gson:1.26.0'
implementation('com.google.api-client:google-api-client-android:1.26.0') {
exclude group: 'org.apache.httpcomponents'
}
implementation('com.google.apis:google-api-services-drive:v3-rev136-1.25.0') {
exclude group: 'org.apache.httpcomponents'
}

implementation "com.googlecode.juniversalchardet:juniversalchardet:$versions.juniversalchardet"

implementation "com.evernote:android-job:$versions.evernote_android_job"
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@
android:windowSoftInputMode="stateAlwaysHidden">
</activity>

<activity
android:name=".android.ui.repo.googledrive.GoogleDriveRepoActivity"
android:windowSoftInputMode="stateAlwaysHidden">
</activity>

<activity
android:name="com.dropbox.core.android.AuthActivity"
android:configChanges="orientation|keyboard"
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/java/com/orgzly/android/di/AppComponent.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import com.orgzly.android.ui.refile.RefileFragment
import com.orgzly.android.ui.repo.BrowserActivity
import com.orgzly.android.ui.repo.directory.DirectoryRepoActivity
import com.orgzly.android.ui.repo.dropbox.DropboxRepoActivity
import com.orgzly.android.ui.repo.googledrive.GoogleDriveRepoActivity
import com.orgzly.android.ui.repo.git.GitRepoActivity
import com.orgzly.android.ui.repo.webdav.WebdavRepoActivity
import com.orgzly.android.ui.repos.ReposActivity
Expand Down Expand Up @@ -51,6 +52,7 @@ interface AppComponent {
fun inject(arg: MainActivity)
fun inject(arg: ReposActivity)
fun inject(arg: DropboxRepoActivity)
fun inject(arg: GoogleDriveRepoActivity)
fun inject(arg: DirectoryRepoActivity)
fun inject(arg: WebdavRepoActivity)
fun inject(arg: GitRepoActivity)
Expand Down Expand Up @@ -83,4 +85,4 @@ interface AppComponent {
fun inject(arg: ListWidgetProvider)
fun inject(arg: NewNoteBroadcastReceiver)
fun inject(arg: TimeChangeBroadcastReceiver)
}
}
Loading

0 comments on commit 1ef1b1b

Please sign in to comment.