Skip to content

Commit

Permalink
chore(common-components-update): updated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
godenzim committed Mar 11, 2022
1 parent 55991b8 commit d236d04
Show file tree
Hide file tree
Showing 7 changed files with 886 additions and 231 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ COPY package.json /app
COPY package-lock.json /app
COPY config /app/config
COPY apply-diagnostic-modules.js /app
COPY fix-qrscanner-gradle.js /app

# install dependencies
RUN npm install
Expand Down
6 changes: 3 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ android {
buildConfigField("String", "PRODUCT_FLAVOR", '"fdroid"')
}
}
lintOptions{
disable 'MissingDefaultResource'
}
lint {
disable 'MissingDefaultResource'
}
}

repositories {
Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.5.31'
ext.kotlin_version = '1.6.10'

repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.android.tools.build:gradle:7.1.2'
classpath 'com.google.gms:google-services:4.3.10'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

Expand Down
1 change: 1 addition & 0 deletions build/android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ COPY package.json /app/package.json
COPY package-lock.json /app/package-lock.json
COPY config /app/config
COPY apply-diagnostic-modules.js /app
COPY fix-qrscanner-gradle.js /app

# install dependencies
RUN npm i
Expand Down
26 changes: 26 additions & 0 deletions fix-qrscanner-gradle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// a workaround for cordova-diagnostic-plugin: the plugin ignores Capacitor config setting and installs all its features

const fs = require('fs')
const path = require('path')

const rootdir = ''
const qrscannerGradle = path.join(rootdir, 'node_modules/cordova-plugin-qrscanner/src/android/qrscanner.gradle')

const configFiles = [qrscannerGradle]

function replaceDeprecated(configFile) {
fs.readFile(configFile, 'utf8', function(err, data) {
if (err) {
return console.log(err)
}

const result = data.replaceAll('compile', 'implementation')
fs.writeFile(configFile, result, 'utf8', function(err) {
if (err) {
console.log(err)
}
})
})
}

configFiles.forEach(configFile => replaceDeprecated(configFile))
Loading

0 comments on commit d236d04

Please sign in to comment.