Skip to content

Commit

Permalink
Merge branch 'develop' into 'master'
Browse files Browse the repository at this point in the history
Develop

See merge request papers/airgap/airgap-vault!446
  • Loading branch information
godenzim committed Jun 14, 2023
2 parents 6730f17 + c3053b1 commit 2afb19e
Show file tree
Hide file tree
Showing 149 changed files with 4,138 additions and 4,297 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ build_ios:
- echo "$IOS_BUILD_JSON" > build.json
script:
- export DEVELOPER_DIR=$XCODE_PATH
- nvm use 16
- nvm use 16.19.1
- yarn install --frozen-lockfile
- yarn configure-mangle
- yarn apply-diagnostic-modules # manually remove unused cordova-diagnostic-plugin modules
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.13.1
FROM node:16.19.1

# See https://crbug.com/795759
RUN apt-get update && apt-get install -yq libgconf-2-4 bzip2 build-essential libxtst6
Expand All @@ -8,7 +8,7 @@ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
RUN echo "deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty multiverse \
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates multiverse \
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse" | tee /etc/apt/sources.list.d/multiverse.list
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse" | tee /etc/apt/sources.list.d/multiverse.list

# Install latest chrome dev package and fonts to support major charsets (Chinese, Japanese, Arabic, Hebrew, Thai and a few others)
# Note: this installs the necessary libs to make the bundled version of Chromium that Puppeteer
Expand All @@ -33,6 +33,7 @@ COPY install-test-deps.js /app
COPY package.json /app
COPY yarn.lock /app
COPY apply-diagnostic-modules.js /app
COPY patch-dependency-versions.js /app
COPY fix-qrscanner-gradle.js /app
COPY copy-builtin-modules.js /app

Expand Down
11 changes: 11 additions & 0 deletions android/.project
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,15 @@
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
<filteredResources>
<filter>
<id>1684132857929</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
17 changes: 10 additions & 7 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
apply plugin: 'com.android.application'

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


android {
namespace "it.airgap.vault"
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 31
defaultConfig {
applicationId "it.airgap.vault"
Expand All @@ -30,12 +28,15 @@ android {
matchingFallbacks = ['release']
}
}
buildFeatures {
buildConfig true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '11'
jvmTarget = '17'
}
lint {
abortOnError false
Expand All @@ -59,7 +60,7 @@ dependencies {
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation "androidx.exifinterface:exifinterface:$androidxExifinterfaceVersion"
implementation project(':capacitor-android')
implementation 'androidx.webkit:webkit:1.4.0'
implementation 'androidx.webkit:webkit:1.7.0'
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test:core:$androidxTestCoreVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
Expand All @@ -82,6 +83,8 @@ dependencies {
def saplingVersion = "0.0.7"
implementation "com.github.airgap-it:airgap-sapling:$saplingVersion"

implementation "org.bouncycastle:bcprov-jdk15on:1.70"

implementation "androidx.javascriptengine:javascriptengine:1.0.0-alpha03"
implementation 'com.google.guava:listenablefuture:1.0'
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-guava:$coroutinesVersion"
Expand Down
8 changes: 4 additions & 4 deletions android/app/capacitor.build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}

Expand All @@ -16,8 +16,8 @@ dependencies {
implementation project(':capacitor-splash-screen')
implementation project(':capacitor-status-bar')
implementation project(':capawesome-capacitor-file-picker')
implementation "com.android.support:support-v4:26.+"
implementation "com.android.support:appcompat-v7:26.+"
implementation "androidx.legacy:legacy-support-v4:1.0.0"
implementation "androidx.appcompat:appcompat:1.6.1"
}
apply from: "../../node_modules/cordova-plugin-qrscanner-11/src/android/qrscanner.gradle"

Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="it.airgap.vault">
>

<uses-sdk tools:overrideLibrary="androidx.javascriptengine" />

Expand Down
3 changes: 3 additions & 0 deletions android/app/src/main/assets/capacitor.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"launchAutoHide": false,
"androidSplashResourceName": "screen"
}
},
"server": {
"androidScheme": "http"
}
}
5 changes: 3 additions & 2 deletions android/app/src/main/java/it/airgap/vault/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import it.airgap.vault.plugin.appinfo.AppInfo;
import it.airgap.vault.plugin.camerapreview.CameraPreview;
import it.airgap.vault.plugin.environment.Environment;
import it.airgap.vault.plugin.isolatedmodules.IsolatedModules;
import it.airgap.vault.plugin.saplingnative.SaplingNative;
import it.airgap.vault.plugin.securityutils.SecurityUtils;
Expand All @@ -19,9 +20,9 @@ public void onCreate(Bundle savedInstanceState) {
registerPlugin(SecurityUtils.class);
registerPlugin(SaplingNative.class);
registerPlugin(Zip.class);
registerPlugin(Environment.class);

// disable true isolation until it's production ready
// registerPlugin(IsolatedModules.class);
registerPlugin(IsolatedModules.class);

super.onCreate(savedInstanceState);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package it.airgap.vault.plugin.environment

import android.content.Intent
import com.getcapacitor.JSObject
import com.getcapacitor.Plugin
import com.getcapacitor.annotation.CapacitorPlugin

@CapacitorPlugin
class Environment : Plugin() {

override fun handleOnNewIntent(intent: Intent?) {
val context = Context.fromString(intent?.getStringExtra("it.airgap.vault.CONTEXT"))
handleContextChanged(context)

super.handleOnNewIntent(intent)
}

private fun handleContextChanged(context: Context) {
val data = JSObject().apply { put("context", context.value) }
notifyListeners("envContextChanged", data, true)
}

private enum class Context(val value: String) {
Empty("empty"),
Knox("knox");

companion object {
fun fromString(value: String?): Context = value?.let {
v -> values().find { it.value == v }
} ?: Empty
}
}
}
Loading

0 comments on commit 2afb19e

Please sign in to comment.