Skip to content

Commit

Permalink
Merge pull request #41 from VirgilSecurity/dev
Browse files Browse the repository at this point in the history
Ratchet, Temp Channels, PQC, auth encryption to master
  • Loading branch information
BuddahLD authored Jan 22, 2020
2 parents 41854b4 + b10a40f commit 7567446
Show file tree
Hide file tree
Showing 260 changed files with 6,901 additions and 1,816 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ eclipse-aar/
build/
gradle-wrapper.jar
gradle-wrapper.properties
gradle.properties

# Ignore Gradle GUI config
gradle-app.setting
Expand Down Expand Up @@ -178,3 +177,5 @@ fabric.properties
# Project-specific
!crypto/libs/virgil_crypto_java.jar
publishArtifacts.sh
env.json
compat_data.json
17 changes: 6 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@ language: android
sudo: required
jdk: oraclejdk8

# Include branches
branches:
only:
- dev
- master
- travis-setup

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
Expand All @@ -26,8 +19,6 @@ env:
- ANDROID_EMULATOR_API=24
- ADB_INSTALL_TIMEOUT=5 # minutes
- ANDROID_ABI=default/armeabi-v7a
- secure: Nz/+LNm9NO3PgvrwLIKDVjlJTskzZPKYXWnNe1T8kUflcQp6dygc9M3tqOgXVRTb33DPhZFZoM04fHJ7iAAyOydH0uNt3nI8zujFiQg7wGOm4vUczk6PYQrWNe/uAyrov+KjLbjNElBxZPDgMDTRD2e3j+UG0X+Xzjm3LqrWChpDjS037EuCpEILNdNETkHeAMVwAvcHrWkXiFMO6aYCHV+teo0zivrELbo6MCaxfMOKY0eMckgxJFtQbAF3hshr98325cczvIzQt5J/bFBkMaBx0IkSDAktDk++jVnoqIfpQVkM6x4mSjz64Q22BW5wIHsgfkT/Cjm7vn1LNpQsPO28p1Ja/W3TqVCeU1XR6sm7Zn+3b7ecSfGjh7p8L6gu9rzpsGIHOG88aWZuqpnF5Vgxjs4l2AXd/luAjv0ATLY45A9SMllLgzixrV4R0xn/DWUlKHsZ4KjiZZipFRXHYvxI/iB8BJR+fRSPKqWWtVxB44mHN7zBS5PvRfu/L7AugF3C2+5OgU+r15u+hQYdHxOrQhWEUKObSJ42MKjEzwaH6oioYKee0ImdB1iPu0IP1jvcImtWanPGU/wxP4ssjTdEOAZepJg90gNes/Hx2gdal6iRtvN2G1xpCJXty4EBLbK2lIfXP6//IiQG0EDLAJfw5npRBluiDvG/tcDxW1E=
- secure: C7b6XlTt+gqr3O4avm7CwgheSi0o0Hn0SQPZHa1Fs9+xbcNLI5EAE6BMNIDH/70aOl/DygJptxmr7Fx8NwAiU+dGWKqe6NhIqpZiizGz9o1J3FpoF5+v+r0777b2oHrqnUiBT7MO//3R1kFL4WmEyoEKzkwT5yMz3qnCI1feKCvKXtLdoyDt3E9w9fMz83lWSXIp0YYpaMyUDKBVwdkbPFbfvr9Ew2spWjTrUkb0gVTbz+GHzdX0Y0PrKHusdZiLQSd3MqmXP7y4VcIafzKEWgXaxe94GBc/r5v9RLBwhqORIhtcu0GJMq9KuWH2uROspgJ9jzgAAJcrTWxaNJ02oarRQF7QdJPdfuIq5XLGqOaMCLKAFjAaogyPacfbUmcfeFokbPW9I7LoHIDcCydSdYC3K3Iw725FoPoNhVncOuwxouMnaWECXLQVlxCQmNN8QSlTBC6bFrgQ/2NwkMPSkMKr+/dKxnPvnWmo6uzqGSZwnLoGlnIryNPzIf8CZTsSWcl6dWxw7LYNMuPOVZGz4AMN8NKFqIrbl0sE3cr00z8N1FHwX2hD2D6dYRMpnv5l6N6ZxxKQT4BwmmpnFIIiKJyoNodUlgYtZX3iJICLQcpmHTrTle+h6XT24biUFF/uPO2TUGmhCEVzLgdlPvbiCePlAg1oytJIxmXjrmCJx/A=

android:
components:
Expand Down Expand Up @@ -56,7 +47,8 @@ before_install:
- echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"
- chmod +x gradlew
- ./gradlew dependencies || true
- openssl aes-256-cbc -K $encrypted_62e1b1822e5d_key -iv $encrypted_62e1b1822e5d_iv -in ethree-common/src/androidTest/resources/compat/compat_data.json.enc -out ethree-common/src/androidTest/resources/compat/compat_data.json -d
- openssl aes-256-cbc -K $encrypted_7a2772d532c7_key -iv $encrypted_7a2772d532c7_iv -in creds.tar.enc -out creds.tar -d
- tar xvf creds.tar

before_script:
- android list targets
Expand All @@ -68,7 +60,10 @@ before_script:
- adb shell input keyevent 82 &

script:
- "./gradlew clean build connectedCheck -PdisablePreDex --stacktrace"
- "./gradlew clean"
- "./gradlew :ethree-common:connectedCheck -PdisablePreDex --stacktrace"
- "./gradlew :tests:connectedCheck -PdisablePreDex --stacktrace"
- "./gradlew :testsenclave:connectedCheck -PdisablePreDex --stacktrace"

after_success:
.ci/push-javadoc-to-gh-pages.sh
314 changes: 264 additions & 50 deletions README.md

Large diffs are not rendered by default.

212 changes: 197 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2019, Virgil Security, Inc.
* Copyright (c) 2015-2020, Virgil Security, Inc.
*
* Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com>
*
Expand Down Expand Up @@ -32,36 +32,43 @@
*/

buildscript {
ext.kotlin_version = '1.3.61'

ext.versions = [
// Virgil
virgilSdk : '6.0',
virgilCrypto: '0.10.2',
pythia : '0.3.2',
virgilSdk : '7.1.0',
virgilCrypto : '0.12.0',
pythia : '0.3.3',
ratchet : '0.1.1',

// Kotlin
kotlin : '1.3.50',
coroutines : '1.3.0-M1',
kotlin : '1.3.61',
coroutines : '1.3.3',

// Gradle
gradle : '3.5.0',
gradle : '3.5.3',

// Maven
mavenPublish: '3.6.2',
mavenPublish : '3.6.2',

// Android
android : '4.1.1.4',
appCompat : '28.0.0',
android : '4.1.1.4',
appCompat : '1.1.0',

// Room
room : '2.2.0-rc01',
room : '2.2.3',

// Docs
dokka : '0.9.18',
dokka : '0.9.18',

// Tests
junit : '4.12',
testsRunner : '1.1.1',
espresso : '3.0.2',
junit : '4.12',
testsRunner : '1.1.1',
espresso : '3.0.2',
virgilTestCommon: '0.1',

// Benchmark
androidBenchmark: '1.0.0',
]
ext.androidOptions = [
compileSdkVersion : 28,
Expand All @@ -80,6 +87,8 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$versions.dokka"
classpath "digital.wup:android-maven-publish:$versions.mavenPublish"
classpath "androidx.benchmark:benchmark-gradle-plugin:$versions.androidBenchmark"

}
}

Expand All @@ -91,6 +100,179 @@ allprojects {
}
}

/**
* Gets property from system properties.
*
* @param name Of System property to get.
*
* @return System property or null if not found.
*/
def static getSystemProperty(String name) {
def property
if (System.getProperty(name) != null) {
property = System.getProperty(name)
} else {
property = System.getenv(name)
}

return property
}

/**
* Gets property from both - gradle properties and system properties.
*
* @param name Of property to get.
*/
def getGradleOrSystemProperty(String name, Project project) {
def property

if (project.hasProperty(name)) {
property = project.getProperty(name)
} else {
property = getSystemProperty(name)
}

return property
}

// Artifacts packages
final String BASE_VIRGIL_PACKAGE = 'com.virgilsecurity'

// Packages versions
final String SDK_VERSION = '0.8.0'

subprojects {
group BASE_VIRGIL_PACKAGE
version SDK_VERSION

def isRegular = (it.name == 'ethree-common'
|| it.name == 'ethree-kotlin'
|| it.name == 'ethree-enclave')
def isTest = (it.name == 'tests' || it.name == 'testsenclave')
def isBenchmark = (it.name == 'ethree-benchmark')

if (isRegular) {
apply plugin: 'com.android.library'
apply plugin: 'digital.wup.android-maven-publish'
apply plugin: 'org.jetbrains.dokka'
apply plugin: 'signing'
apply plugin: 'maven-publish'
} else if (isTest) {
apply plugin: 'com.android.application'
apply from: '../tests-verbal-output.gradle'
} else if (isBenchmark) {
apply plugin: 'com.android.library'
}

apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

if (it.name == 'ethree-common') {
apply from: '../tests-verbal-output.gradle'
apply plugin: 'kotlin-kapt'
}

android {
compileSdkVersion androidOptions.compileSdkVersion
buildToolsVersion androidOptions.buildToolsVersion

defaultConfig {
targetSdkVersion androidOptions.targetSdkVersion
}
buildTypes {
debug {
minifyEnabled false
}
release {
minifyEnabled false
}
}
lintOptions {
abortOnError false
}
}

sourceCompatibility = "8"
targetCompatibility = "8"

if (isRegular) {
task sourcesJar(type: Jar) {
from(project.android.sourceSets.main.java.srcDirs)
classifier = 'sources'
}

task javadocJar(type: Jar, dependsOn: 'dokka') {
from("$buildDir/javadoc")
classifier = 'javadoc'
}

def authentication_username = getGradleOrSystemProperty('authentication_username', project)
def authentication_password = getGradleOrSystemProperty('authentication_password', project)

publishing {
publications {
mavenJava(MavenPublication) {
artifact javadocJar
artifact sourcesJar
from components.android

pom {
description = 'Virgil Security provides an SDK which symplifies work with Virgil services and presents easy to use API for adding security to any application. In a few simple steps you can setup user encryption with multidevice support.'
url = 'https://www.virgilsecurity.com/'
licenses {
license {
name = 'Virgil Security, Inc. license'
url = 'https://github.com/VirgilSecurity/virgil-e3kit-kotlin/blob/master/LICENSE.txt'
}
}
developers {
developer {
id = 'BuddahLD'
name = 'Danylo Oliinyk'
email = 'doliinyk@virgilsecurity.com'
organizationUrl = 'https://github.com/BuddahLD'
}
developer {
id = 'andrii-iakovenko'
name = 'Andrii Iakovenko'
email = 'andrii-iakovenko@gmail.com'
organizationUrl = 'https://github.com/andrii-iakovenko'
}
}
scm {
connection = 'scm:git:https://github.com/VirgilSecurity/virgil-e3kit-kotlin.git'
developerConnection = 'scm:git:git@github.com:VirgilSecurity/virgil-e3kit-kotlin.git'
url = 'https://github.com/VirgilSecurity/virgil-e3kit-kotlin'
}
}
}
}

repositories {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username "${authentication_username}"
password "${authentication_password}"
}
}
}
}

signing {
sign publishing.publications.mavenJava
}

dokka {
outputFormat = 'html'
outputDirectory = "$buildDir/javadoc"
reportUndocumented = false
}
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
Binary file added creds.tar.enc
Binary file not shown.
37 changes: 37 additions & 0 deletions ethree-benchmark/benchmark-proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

-dontobfuscate

-ignorewarnings

-keepattributes *Annotation*

-dontnote junit.framework.**
-dontnote junit.runner.**

-dontwarn androidx.test.**
-dontwarn org.junit.**
-dontwarn org.hamcrest.**
-dontwarn com.squareup.javawriter.JavaWriter

-keepclasseswithmembers @org.junit.runner.RunWith public class *
Loading

0 comments on commit 7567446

Please sign in to comment.