Skip to content

Commit

Permalink
Merge branch 'develop' into feat/security-level-self-check
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim committed Jul 20, 2023
2 parents 10b710b + 891af2f commit e25c242
Show file tree
Hide file tree
Showing 179 changed files with 6,035 additions and 4,154 deletions.
9 changes: 5 additions & 4 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Chrome >=60
Firefox >=63
Chrome >=79
ChromeAndroid >=79
Firefox >=70
Edge >=79
Safari >=13
iOS >=13
Safari >=14
iOS >=14
7 changes: 2 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,8 @@ jobs:
path: ./*
key: prebuild-${{ runner.os }}-${{ github.sha }}

- name: 🔧 Disable pure getters
run: yarn run disable-pure-getters

- name: 🔧 Configure mangle
run: yarn run configure-mangle
- name: 🔧 Prepare prod build
run: yarn run prepare-prod-build

- name: 🔧 Apply diagnostic modules
run: yarn run apply-diagnostic-modules
Expand Down
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ 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 prepare-prod-build
- yarn apply-diagnostic-modules # manually remove unused cordova-diagnostic-plugin modules
- yarn ionic info
- yarn ionic build --prod
Expand Down
39 changes: 39 additions & 0 deletions .gitlab/issue_templates/user_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# User reported issue

**Where the issue was reported** (link to post if available):

****OS used** (Android/iOS):

**Device used** (Model):

**Version** (Wallet and/or Vault, eg 3.28.0):

**Blockchain involved**:

## What the user did:
<!---What the user said he/she wanted to do --->

## What issue the user was confrontend with:
<!---What the user said didn't work as expected --->

## Steps to reproduce:
<!--- How can a developer reproduce this issue --->

## What is the expected _correct_ behavior?
<!--- What you should see instead --->

## Relevant logs, screenshots and/or links
<!--- Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's tough to read otherwise. --->

## Possible fixes / approach
<!--- If you can, link to the line of code that might be responsible for the problem or describe how to solve it --->

## Additional information
<!--- anything that might be important for whoever works with this issue --->

<!--- if you know already how long it takes, add an estimate eg. 2h or 1d --->
/estimate

<!--- these standard labels will be added to this issue>--->
/label ~"type::bug" ~"proj::airgap" ~"community"
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
15 changes: 8 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 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"
}
}
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.7.10'
ext.kotlin_version = '1.8.20'

repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'com.google.gms:google-services:4.3.14'
classpath 'com.android.tools.build:gradle:8.0.0'
classpath 'com.google.gms:google-services:4.3.15'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand Down
4 changes: 2 additions & 2 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#Thu Oct 21 16:14:56 CEST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
distributionSha256Sum=e6d864e3b5bc05cc62041842b306383fc1fefcec359e70cebb1d470a6094ca82
distributionSha256Sum=47a5bfed9ef814f90f8debcbbb315e8e7c654109acd224595ea39fca95c5d4da
18 changes: 9 additions & 9 deletions android/variables.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ ext {
minSdkVersion = 22
compileSdkVersion = 33
targetSdkVersion = 33
androidxActivityVersion = '1.4.0'
androidxAppCompatVersion = '1.4.2'
androidxActivityVersion = '1.7.0'
androidxAppCompatVersion = '1.6.1'
androidxCoordinatorLayoutVersion = '1.2.0'
androidxCoreVersion = '1.8.0'
androidxFragmentVersion = '1.4.1'
androidxExifinterfaceVersion = '1.3.3'
androidxMaterialVersion = '1.6.1'
androidxCoreVersion = '1.10.0'
androidxFragmentVersion = '1.5.6'
androidxExifinterfaceVersion = '1.3.6'
androidxMaterialVersion = '1.8.0'
junitVersion = '4.13.2'
androidxTestCoreVersion = '1.4.0'
androidxJunitVersion = '1.1.3'
androidxEspressoCoreVersion = '3.4.0'
androidxJunitVersion = '1.1.5'
androidxEspressoCoreVersion = '3.5.1'
cordovaAndroidVersion = '10.1.1'
coreSplashScreenVersion = '1.0.0'
androidxWebkitVersion = '1.4.0'
androidxWebkitVersion = '1.6.1'
}
7 changes: 4 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"defaultProject": "app",
"newProjectRoot": "projects",
"projects": {
"app": {
Expand Down Expand Up @@ -191,8 +190,10 @@
}
},
"cli": {
"defaultCollection": "@ionic/angular-toolkit",
"analytics": false
"analytics": false,
"schematicCollections": [
"@ionic/angular-toolkit"
]
},
"schematics": {
"@ionic/angular-toolkit:component": {
Expand Down
11 changes: 5 additions & 6 deletions build/android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ RUN apt-get update -y && apt-get install -y \
pkg-config \
libjpeg-dev \
libcairo2-dev \
openjdk-11-jdk-headless
openjdk-17-jdk-headless

ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64

# create app directory
RUN mkdir /app
WORKDIR /app

RUN yarn cache clean --force && yarn global add n && n 16.13.1
RUN yarn cache clean --force && yarn global add n && n 16.19.1

# Install app dependencies, using wildcard if package-lock exists and copy capacitor configs and ionic configs
COPY package.json yarn.lock apply-diagnostic-modules.js fix-qrscanner-gradle.js capacitor.config.ts ionic.config.json copy-builtin-modules.js /app/
COPY package.json yarn.lock apply-diagnostic-modules.js patch-dependency-versions.js fix-qrscanner-gradle.js capacitor.config.ts ionic.config.json copy-builtin-modules.js /app/

# install dependencies
# run ionic android build
Expand All @@ -30,7 +30,6 @@ COPY . /app
ARG BUILD_NR
RUN sed -i -e "s/versionCode 1/versionCode $BUILD_NR/g" /app/android/app/build.gradle

# disable pure getters due to https://github.com/angular/angular-cli/issues/11439
# configure mangle (keep_fnames) for bitcoinjs https://github.com/bitcoinjs/bitcoinjs-lib/issues/959
# remove unused cordova-diagnostic-plugin features
# jetify dependencies
Expand All @@ -43,7 +42,7 @@ RUN sed -i -e "s/versionCode 1/versionCode $BUILD_NR/g" /app/android/app/build.g
# this has nothing to do with debug!!!:
# copy release-apk
# sign using debug key
RUN yarn configure-mangle \
RUN yarn prepare-prod-build \
&& yarn apply-diagnostic-modules \
&& yarn jetifier \
&& yarn ionic build --prod \
Expand Down
11 changes: 7 additions & 4 deletions capacitor.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import { CapacitorConfig } from '@capacitor/cli'

const config: CapacitorConfig = {
appId: "it.airgap.vault",
appName: "AirGap Vault",
appId: 'it.airgap.vault',
appName: 'AirGap Vault',
bundledWebRuntime: false,
webDir: "www",
webDir: 'www',
plugins: {
SplashScreen: {
launchAutoHide: false,
androidSplashResourceName: "screen"
androidSplashResourceName: 'screen'
}
},
server: {
androidScheme: 'http'
}
}

Expand Down
2 changes: 1 addition & 1 deletion ios/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
App/build
App/Pods
App/App/public
App/Podfile.lock
DerivedData
xcuserdata

# Cordova plugins for Capacitor
capacitor-cordova-ios-plugins


Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit e25c242

Please sign in to comment.