Skip to content

Commit

Permalink
Initial open source commit 🎉
Browse files Browse the repository at this point in the history
  • Loading branch information
SailReal committed Dec 23, 2020
1 parent 95c85b4 commit 8044475
Show file tree
Hide file tree
Showing 959 changed files with 55,670 additions and 91 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build

on:
[push]

jobs:
build:
name: Test
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build and Test
run: bash ./gradlew clean test --stacktrace
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
secrets.properties

###IntelliJ###

*.iml
*.ipr
*.iws
.idea/

###Android###

# Built application files
*.apk
*.aab
*.ap_

# Java class files
*.class

# Generated files
bin/
gen/
**/**/debug/output.json
**/**/release/output.json

# Gradle files
.gradle/
build/
**/release/output-metadata.json
**/debug/output-metadata.json

# Local configuration file (sdk path, etc)
local.properties

# fastlane
secret_key_file.json
**/**/fastlane/fastlane/**
**/**/fastlane/metadata/**
**/**/fastlane/report.xml
**/**/fastlane/mappings/**
**/**/fastlane/release_notes/**
**/**/fastlane/latest_versions/**
.env.default
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "msa-auth-for-android"]
path = msa-auth-for-android
url = https://github.com/SailReal/msa-auth-for-android.git
[submodule "subsampling-scale-image-view"]
path = subsampling-scale-image-view
url = https://github.com/SailReal/subsampling-scale-image-view.git
674 changes: 674 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

29 changes: 24 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,31 @@
[![Community](https://img.shields.io/badge/help-Community-orange.svg)](https://community.cryptomator.org)
[![Documentation](https://img.shields.io/badge/help-Docs-orange.svg)](https://docs.cryptomator.org)

Cryptomator for Android is available on Google play: [Download Cryptomator for Android](https://play.google.com/store/apps/details?id=org.cryptomator)
Cryptomator offers multi-platform transparent client-side encryption of your files in the cloud.

## Open Core
Cryptomator for Android is currently available in the following distribution channels:

Cryptomator for Android is an _open core_ project. This repository is used for collecting issues regarding the Android app of Cryptomator.
1. [Using Google Play](https://play.google.com/store/apps/details?id=org.cryptomator)
2. [Using Cryptomator's Website](https://cryptomator.org/android/)
3. Building from source using Gradle (instructions below)

You can find the open source Java crypto library to access Cryptomator vaults at this repository: [cryptomator/cryptolib](https://github.com/cryptomator/cryptolib)
## Building

For more information on the security details visit [cryptomator.org](https://cryptomator.org/architecture/).
### Dependencies

* Git
* JDK 8
* Gradle

### Run Git and Gradle

```
git submodule init && git submodule update // (not necessary if cloned using --recurse-submodules)
./gradlew assembleLicenseDebug
```

Before connecting to Onedrive or Dropbox you have to enter valid API keys in [secrets.properties](https://github.com/cryptomator/android/blob/master/secrets.properties).

## License

This project is dual-licensed under the GPLv3 for FOSS projects as well as a commercial license for independent software vendors and resellers. If you want to modify this application under different conditions, feel free to contact our support team.
61 changes: 61 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
apply from: 'buildsystem/ci.gradle'
apply from: 'buildsystem/dependencies.gradle'
apply plugin: "com.vanniktech.android.junit.jacoco"

buildscript {
ext.kotlin_version = '1.4.21'
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
classpath 'org.greenrobot:greendao-gradle-plugin:3.3.0'
classpath 'com.fernandocejas.frodo:frodo-plugin:0.8.3'
classpath 'com.vanniktech:gradle-android-junit-jacoco-plugin:0.16.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "de.mannodermaus.gradle.plugins:android-junit5:1.7.0.0"
}
}

def getVersionCode = { ->
try {
def branchName = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', '--abbrev-ref', 'HEAD'
standardOutput = branchName
}
def appBuild = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-list', '--count', branchName.toString().trim()
standardOutput = appBuild
}
return Integer.parseInt(appBuild.toString().trim()) + 1958 // adding 1958 for legacy reasons
}
catch (ignored) {
return -1
}
}

allprojects {
ext {
androidApplicationId = 'org.cryptomator'
androidVersionCode = getVersionCode()
androidVersionName = '1.5.11-SNAPSHOT'
}
repositories {
mavenCentral()
maven {
url "https://maven.google.com"
}
flatDir {
dirs '../libs'
}
google()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
13 changes: 13 additions & 0 deletions buildsystem/ci.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
def ciServer = 'TRAVIS'
def executingOnCI = "true" == System.getenv(ciServer)

// Since for CI we always do full clean builds, we don't want to pre-dex
// See http://tools.android.com/tech-docs/new-build-system/tips
subprojects {
project.plugins.whenPluginAdded { plugin ->
if ('com.android.build.gradle.AppPlugin' == plugin.class.name ||
'com.android.build.gradle.LibraryPlugin' == plugin.class.name) {
project.android.dexOptions.preDexLibraries = !executingOnCI
}
}
}
154 changes: 154 additions & 0 deletions buildsystem/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
allprojects {
repositories {
jcenter()
}
}

ext {
androidBuildToolsVersion = "29.0.2"
androidMinSdkVersion = 23
androidTargetSdkVersion = 29
androidCompileSdkVersion = 29

// android and java libs
androidVersion = '4.1.1.4'
multidexVersion = '2.0.1'
javaxAnnotationVersion = '1.0'

// support lib
androidSupportAnnotationsVersion = '1.1.0'
androidSupportAppcompatVersion = '1.2.0' // check https://stackoverflow.com/questions/41025200/android-view-inflateexception-error-inflating-class-android-webkit-webview/57968071#57968071 !!!!!!
androidSupportDesignVersion = '1.2.1'

// app frameworks and utilities

rxJavaVersion = '2.2.20'
rxAndroidVersion = '2.1.1'
rxBindingVersion = '2.2.0'

daggerVersion = '2.30.1'

gsonVersion = '2.8.6'

okHttpVersion = '4.9.0'
okHttpDigestVersion = '2.5'

velocityVersion = '1.7'

timberVersion = '4.7.1'

zxcvbnVersion = '1.3.1'

scaleImageViewVersion = '3.10.0'

lruFileCacheVersion = '1.0'

// KEEP IN SYNC WITH GENERATOR VERSION IN root build.gradle
greenDaoVersion = '3.3.0'

// cloud provider libs

// do not update to 1.4.0 until dropping minsdk 4.x
cryptolibVersion = '1.3.0'

dropboxVersion = '3.1.5'

googleApiServicesVersion = 'v3-rev197-1.25.0'
googlePlayServicesVersion = '19.0.0'
googleClientVersion = '1.31.1'

msgraphVersion = '2.5.0'
msaAuthVersion = '0.10.0'

commonsCodecVersion = '1.15'

recyclerViewFastScrollVersion = '2.0.1'

// testing dependencies

jUnitVersion = '5.7.0'
jUnit4Version = '4.13.1'
assertJVersion = '1.7.1'
mockitoVersion = '3.6.28'
mockitoInlineVersion = '3.6.28'
hamcrestVersion = '1.3'
dexmakerVersion = '1.0'
espressoVersion = '3.3.0'
testingSupportLibVersion = '0.1'
runnerVersion = '1.3.0'
rulesVersion = '1.3.0'
contributionVersion = '3.3.0'
uiautomatorVersion = '2.2.0'

androidxCoreVersion = '1.3.2'
androidxFragmentVersion = '1.2.5'
androidxViewpagerVersion = '1.0.0'
androidxSwiperefreshVersion = '1.1.0'
androidxPreferenceVersion = '1.0.0' // 1.1.0 and 1.1.2 does have a bug with the text size
androidxRecyclerViewVersion = '1.1.0'
androidxDocumentfileVersion = '1.0.1'
androidxBiometricVersion = '1.0.1'
androidxTestCoreVersion = '1.3.0'

jsonWebTokenApiVersion = '0.11.2'

dependencies = [
android : "com.google.android:android:${androidVersion}",
androidAnnotations : "androidx.annotation:annotation:${androidSupportAnnotationsVersion}",
appcompat : "androidx.appcompat:appcompat:${androidSupportAppcompatVersion}",
androidxBiometric : "androidx.biometric:biometric:${androidxBiometricVersion}",
androidxCore : "androidx.core:core-ktx:${androidxCoreVersion}",
androidxFragment : "androidx.fragment:fragment-ktx:${androidxFragmentVersion}",
androidxViewpager : "androidx.viewpager:viewpager:${androidxViewpagerVersion}",
androidxSwiperefresh : "androidx.swiperefreshlayout:swiperefreshlayout:${androidxSwiperefreshVersion}",
androidxPreference : "androidx.preference:preference:${androidxPreferenceVersion}",
documentFile : "androidx.documentfile:documentfile:${androidxDocumentfileVersion}",
recyclerView : "androidx.recyclerview:recyclerview:${androidxRecyclerViewVersion}",
androidxTestCore : "androidx.test:core:${androidxTestCoreVersion}",
commonsCodec : "commons-codec:commons-codec:${commonsCodecVersion}",
cryptolib : "org.cryptomator:cryptolib:${cryptolibVersion}",
dagger : "com.google.dagger:dagger:${daggerVersion}",
daggerCompiler : "com.google.dagger:dagger-compiler:${daggerVersion}",
design : "com.google.android.material:material:${androidSupportDesignVersion}",
dropbox : "com.dropbox.core:dropbox-core-sdk:${dropboxVersion}",
espresso : "androidx.test.espresso:espresso-core:${espressoVersion}",
googleApiClientAndroid: "com.google.api-client:google-api-client-android:${googleClientVersion}",
googleApiServicesDrive: "com.google.apis:google-api-services-drive:${googleApiServicesVersion}",
googlePlayServicesAuth: "com.google.android.gms:play-services-auth:${googlePlayServicesVersion}",
greenDao : "org.greenrobot:greendao:${greenDaoVersion}",
gson : "com.google.code.gson:gson:${gsonVersion}",
hamcrest : "org.hamcrest:hamcrest-all:${hamcrestVersion}",
javaxAnnotation : "javax.annotation:jsr250-api:${javaxAnnotationVersion}",
junit : "org.junit.jupiter:junit-jupiter:${jUnitVersion}",
junitApi : "org.junit.jupiter:junit-jupiter-api:${jUnitVersion}",
junitEngine : "org.junit.jupiter:junit-jupiter-engine:${jUnitVersion}",
junitParams : "org.junit.jupiter:junit-jupiter-params:${jUnitVersion}",
junit4 : "org.junit.jupiter:junit-jupiter:${jUnit4Version}",
junit4Engine : "org.junit.vintage:junit-vintage-engine:${jUnitVersion}",
msgraph : "com.microsoft.graph:microsoft-graph:${msgraphVersion}",
msaAuth : "com.microsoft.graph:msa-auth-for-android-adapter:${msaAuthVersion}",
mockito : "org.mockito:mockito-core:${mockitoVersion}",
mockitoInline : "org.mockito:mockito-inline:${mockitoInlineVersion}",
multidex : "androidx.multidex:multidex:${multidexVersion}",
okHttp : "com.squareup.okhttp3:okhttp:${okHttpVersion}",
okHttpDigest : "com.burgstaller:okhttp-digest:${okHttpDigestVersion}",
recyclerViewFastScroll: "com.simplecityapps:recyclerview-fastscroll:${recyclerViewFastScrollVersion}",
rxJava : "io.reactivex.rxjava2:rxjava:${rxJavaVersion}",
rxAndroid : "io.reactivex.rxjava2:rxandroid:${rxAndroidVersion}",
rxBinding : "com.jakewharton.rxbinding2:rxbinding:${rxBindingVersion}",
testingSupportLib : "com.android.support.test:testing-support-lib:${testingSupportLibVersion}",
timber : "com.jakewharton.timber:timber:${timberVersion}",
velocity : "org.apache.velocity:velocity:${velocityVersion}",
runner : "androidx.test:runner:${runnerVersion}",
rules : "androidx.test:rules:${rulesVersion}",
contribution : "androidx.test.espresso:espresso-contrib:${contributionVersion}",
uiAutomator : "androidx.test.uiautomator:uiautomator:${uiautomatorVersion}",
zxcvbn : "com.nulab-inc:zxcvbn:${zxcvbnVersion}",
scaleImageView : "com.davemorrissey.labs:subsampling-scale-image-view:${scaleImageViewVersion}",
lruFileCache : "com.tomclaw.cache:cache:${lruFileCacheVersion}",
jsonWebTokenApi : "io.jsonwebtoken:jjwt-api:${jsonWebTokenApiVersion}",
jsonWebTokenImpl : "io.jsonwebtoken:jjwt-impl:${jsonWebTokenApiVersion}",
jsonWebTokenJson : "io.jsonwebtoken:jjwt-orgjson:${jsonWebTokenApiVersion}"
]

}
1 change: 1 addition & 0 deletions data/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
Loading

0 comments on commit 8044475

Please sign in to comment.