Skip to content

Commit 7567446

Browse files
authored
Merge pull request #41 from VirgilSecurity/dev
Ratchet, Temp Channels, PQC, auth encryption to master
2 parents 41854b4 + b10a40f commit 7567446

File tree

260 files changed

+6901
-1816
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

260 files changed

+6901
-1816
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ eclipse-aar/
3232
build/
3333
gradle-wrapper.jar
3434
gradle-wrapper.properties
35-
gradle.properties
3635

3736
# Ignore Gradle GUI config
3837
gradle-app.setting
@@ -178,3 +177,5 @@ fabric.properties
178177
# Project-specific
179178
!crypto/libs/virgil_crypto_java.jar
180179
publishArtifacts.sh
180+
env.json
181+
compat_data.json

.travis.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@ language: android
22
sudo: required
33
jdk: oraclejdk8
44

5-
# Include branches
6-
branches:
7-
only:
8-
- dev
9-
- master
10-
- travis-setup
11-
125
before_cache:
136
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
147
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
@@ -26,8 +19,6 @@ env:
2619
- ANDROID_EMULATOR_API=24
2720
- ADB_INSTALL_TIMEOUT=5 # minutes
2821
- ANDROID_ABI=default/armeabi-v7a
29-
- secure: Nz/+LNm9NO3PgvrwLIKDVjlJTskzZPKYXWnNe1T8kUflcQp6dygc9M3tqOgXVRTb33DPhZFZoM04fHJ7iAAyOydH0uNt3nI8zujFiQg7wGOm4vUczk6PYQrWNe/uAyrov+KjLbjNElBxZPDgMDTRD2e3j+UG0X+Xzjm3LqrWChpDjS037EuCpEILNdNETkHeAMVwAvcHrWkXiFMO6aYCHV+teo0zivrELbo6MCaxfMOKY0eMckgxJFtQbAF3hshr98325cczvIzQt5J/bFBkMaBx0IkSDAktDk++jVnoqIfpQVkM6x4mSjz64Q22BW5wIHsgfkT/C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 +47,8 @@ before_install:
5647
- echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"
5748
- chmod +x gradlew
5849
- ./gradlew dependencies || true
59-
- 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
50+
- openssl aes-256-cbc -K $encrypted_7a2772d532c7_key -iv $encrypted_7a2772d532c7_iv -in creds.tar.enc -out creds.tar -d
51+
- tar xvf creds.tar
6052

6153
before_script:
6254
- android list targets
@@ -68,7 +60,10 @@ before_script:
6860
- adb shell input keyevent 82 &
6961

7062
script:
71-
- "./gradlew clean build connectedCheck -PdisablePreDex --stacktrace"
63+
- "./gradlew clean"
64+
- "./gradlew :ethree-common:connectedCheck -PdisablePreDex --stacktrace"
65+
- "./gradlew :tests:connectedCheck -PdisablePreDex --stacktrace"
66+
- "./gradlew :testsenclave:connectedCheck -PdisablePreDex --stacktrace"
7267

7368
after_success:
7469
.ci/push-javadoc-to-gh-pages.sh

README.md

Lines changed: 264 additions & 50 deletions
Large diffs are not rendered by default.

build.gradle

Lines changed: 197 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015-2019, Virgil Security, Inc.
2+
* Copyright (c) 2015-2020, Virgil Security, Inc.
33
*
44
* Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com>
55
*
@@ -32,36 +32,43 @@
3232
*/
3333

3434
buildscript {
35+
ext.kotlin_version = '1.3.61'
36+
3537
ext.versions = [
3638
// Virgil
37-
virgilSdk : '6.0',
38-
virgilCrypto: '0.10.2',
39-
pythia : '0.3.2',
39+
virgilSdk : '7.1.0',
40+
virgilCrypto : '0.12.0',
41+
pythia : '0.3.3',
42+
ratchet : '0.1.1',
4043

4144
// Kotlin
42-
kotlin : '1.3.50',
43-
coroutines : '1.3.0-M1',
45+
kotlin : '1.3.61',
46+
coroutines : '1.3.3',
4447

4548
// Gradle
46-
gradle : '3.5.0',
49+
gradle : '3.5.3',
4750

4851
// Maven
49-
mavenPublish: '3.6.2',
52+
mavenPublish : '3.6.2',
5053

5154
// Android
52-
android : '4.1.1.4',
53-
appCompat : '28.0.0',
55+
android : '4.1.1.4',
56+
appCompat : '1.1.0',
5457

5558
// Room
56-
room : '2.2.0-rc01',
59+
room : '2.2.3',
5760

5861
// Docs
59-
dokka : '0.9.18',
62+
dokka : '0.9.18',
6063

6164
// Tests
62-
junit : '4.12',
63-
testsRunner : '1.1.1',
64-
espresso : '3.0.2',
65+
junit : '4.12',
66+
testsRunner : '1.1.1',
67+
espresso : '3.0.2',
68+
virgilTestCommon: '0.1',
69+
70+
// Benchmark
71+
androidBenchmark: '1.0.0',
6572
]
6673
ext.androidOptions = [
6774
compileSdkVersion : 28,
@@ -80,6 +87,8 @@ buildscript {
8087
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin"
8188
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$versions.dokka"
8289
classpath "digital.wup:android-maven-publish:$versions.mavenPublish"
90+
classpath "androidx.benchmark:benchmark-gradle-plugin:$versions.androidBenchmark"
91+
8392
}
8493
}
8594

@@ -91,6 +100,179 @@ allprojects {
91100
}
92101
}
93102

103+
/**
104+
* Gets property from system properties.
105+
*
106+
* @param name Of System property to get.
107+
*
108+
* @return System property or null if not found.
109+
*/
110+
def static getSystemProperty(String name) {
111+
def property
112+
if (System.getProperty(name) != null) {
113+
property = System.getProperty(name)
114+
} else {
115+
property = System.getenv(name)
116+
}
117+
118+
return property
119+
}
120+
121+
/**
122+
* Gets property from both - gradle properties and system properties.
123+
*
124+
* @param name Of property to get.
125+
*/
126+
def getGradleOrSystemProperty(String name, Project project) {
127+
def property
128+
129+
if (project.hasProperty(name)) {
130+
property = project.getProperty(name)
131+
} else {
132+
property = getSystemProperty(name)
133+
}
134+
135+
return property
136+
}
137+
138+
// Artifacts packages
139+
final String BASE_VIRGIL_PACKAGE = 'com.virgilsecurity'
140+
141+
// Packages versions
142+
final String SDK_VERSION = '0.8.0'
143+
144+
subprojects {
145+
group BASE_VIRGIL_PACKAGE
146+
version SDK_VERSION
147+
148+
def isRegular = (it.name == 'ethree-common'
149+
|| it.name == 'ethree-kotlin'
150+
|| it.name == 'ethree-enclave')
151+
def isTest = (it.name == 'tests' || it.name == 'testsenclave')
152+
def isBenchmark = (it.name == 'ethree-benchmark')
153+
154+
if (isRegular) {
155+
apply plugin: 'com.android.library'
156+
apply plugin: 'digital.wup.android-maven-publish'
157+
apply plugin: 'org.jetbrains.dokka'
158+
apply plugin: 'signing'
159+
apply plugin: 'maven-publish'
160+
} else if (isTest) {
161+
apply plugin: 'com.android.application'
162+
apply from: '../tests-verbal-output.gradle'
163+
} else if (isBenchmark) {
164+
apply plugin: 'com.android.library'
165+
}
166+
167+
apply plugin: 'kotlin-android'
168+
apply plugin: 'kotlin-android-extensions'
169+
170+
if (it.name == 'ethree-common') {
171+
apply from: '../tests-verbal-output.gradle'
172+
apply plugin: 'kotlin-kapt'
173+
}
174+
175+
android {
176+
compileSdkVersion androidOptions.compileSdkVersion
177+
buildToolsVersion androidOptions.buildToolsVersion
178+
179+
defaultConfig {
180+
targetSdkVersion androidOptions.targetSdkVersion
181+
}
182+
buildTypes {
183+
debug {
184+
minifyEnabled false
185+
}
186+
release {
187+
minifyEnabled false
188+
}
189+
}
190+
lintOptions {
191+
abortOnError false
192+
}
193+
}
194+
195+
sourceCompatibility = "8"
196+
targetCompatibility = "8"
197+
198+
if (isRegular) {
199+
task sourcesJar(type: Jar) {
200+
from(project.android.sourceSets.main.java.srcDirs)
201+
classifier = 'sources'
202+
}
203+
204+
task javadocJar(type: Jar, dependsOn: 'dokka') {
205+
from("$buildDir/javadoc")
206+
classifier = 'javadoc'
207+
}
208+
209+
def authentication_username = getGradleOrSystemProperty('authentication_username', project)
210+
def authentication_password = getGradleOrSystemProperty('authentication_password', project)
211+
212+
publishing {
213+
publications {
214+
mavenJava(MavenPublication) {
215+
artifact javadocJar
216+
artifact sourcesJar
217+
from components.android
218+
219+
pom {
220+
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.'
221+
url = 'https://www.virgilsecurity.com/'
222+
licenses {
223+
license {
224+
name = 'Virgil Security, Inc. license'
225+
url = 'https://github.com/VirgilSecurity/virgil-e3kit-kotlin/blob/master/LICENSE.txt'
226+
}
227+
}
228+
developers {
229+
developer {
230+
id = 'BuddahLD'
231+
name = 'Danylo Oliinyk'
232+
email = 'doliinyk@virgilsecurity.com'
233+
organizationUrl = 'https://github.com/BuddahLD'
234+
}
235+
developer {
236+
id = 'andrii-iakovenko'
237+
name = 'Andrii Iakovenko'
238+
email = 'andrii-iakovenko@gmail.com'
239+
organizationUrl = 'https://github.com/andrii-iakovenko'
240+
}
241+
}
242+
scm {
243+
connection = 'scm:git:https://github.com/VirgilSecurity/virgil-e3kit-kotlin.git'
244+
developerConnection = 'scm:git:git@github.com:VirgilSecurity/virgil-e3kit-kotlin.git'
245+
url = 'https://github.com/VirgilSecurity/virgil-e3kit-kotlin'
246+
}
247+
}
248+
}
249+
}
250+
251+
repositories {
252+
maven {
253+
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
254+
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
255+
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
256+
credentials {
257+
username "${authentication_username}"
258+
password "${authentication_password}"
259+
}
260+
}
261+
}
262+
}
263+
264+
signing {
265+
sign publishing.publications.mavenJava
266+
}
267+
268+
dokka {
269+
outputFormat = 'html'
270+
outputDirectory = "$buildDir/javadoc"
271+
reportUndocumented = false
272+
}
273+
}
274+
}
275+
94276
task clean(type: Delete) {
95277
delete rootProject.buildDir
96278
}

creds.tar.enc

5.52 KB
Binary file not shown.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
22+
23+
-dontobfuscate
24+
25+
-ignorewarnings
26+
27+
-keepattributes *Annotation*
28+
29+
-dontnote junit.framework.**
30+
-dontnote junit.runner.**
31+
32+
-dontwarn androidx.test.**
33+
-dontwarn org.junit.**
34+
-dontwarn org.hamcrest.**
35+
-dontwarn com.squareup.javawriter.JavaWriter
36+
37+
-keepclasseswithmembers @org.junit.runner.RunWith public class *

0 commit comments

Comments
 (0)