Skip to content

Commit

Permalink
Merge pull request #176 from e-picsa/feat/capacitor-5-updates
Browse files Browse the repository at this point in the history
Feat/core updates
  • Loading branch information
chrismclarke authored Sep 18, 2023
2 parents b52f5dd + 11981a2 commit 4368c5d
Show file tree
Hide file tree
Showing 130 changed files with 9,081 additions and 10,362 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
8 changes: 4 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx", "simple-import-sort"],
"plugins": ["@nx", "simple-import-sort"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
Expand Down Expand Up @@ -34,12 +34,12 @@
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript", "prettier"],
"extends": ["plugin:@nx/typescript", "prettier"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
}
]
Expand Down
28 changes: 23 additions & 5 deletions .github/workflows/android-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,30 @@ jobs:
- uses: actions/checkout@v3
with:
lfs: true
ref: '${{github.event.inputs.build_branch}}'
- uses: actions/setup-node@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
- run: yarn install --immutable
node-version: 18.x
#############################################################################
# Node Modules
# Manually restore any previous cache to speed install
# As immutable install will not change cache only save new cache if not hit
# Uses fine-grained methods from https://github.com/actions/cache
#############################################################################
- uses: actions/cache/restore@v3
id: cache
with:
path: ./.yarn/cache
key: ${{ runner.os }}-node-modules-yarn-v1-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-modules-yarn-v1-
- name: Install node modules
run: yarn install --immutable
- uses: actions/cache/save@v3
if: steps.cache.outputs.cache-hit != 'true'
with:
path: ./.yarn/cache
key: ${{ runner.os }}-node-modules-yarn-v1-${{ hashFiles('yarn.lock') }}
- name: Populate google-services.json
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
Expand Down
27 changes: 23 additions & 4 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,30 @@ jobs:
- uses: actions/checkout@v3
with:
lfs: true
- uses: actions/setup-node@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
- run: yarn install --immutable
node-version: 18.x
#############################################################################
# Node Modules
# Manually restore any previous cache to speed install
# As immutable install will not change cache only save new cache if not hit
# Uses fine-grained methods from https://github.com/actions/cache
#############################################################################
- uses: actions/cache/restore@v3
id: cache
with:
path: ./.yarn/cache
key: ${{ runner.os }}-node-modules-yarn-v1-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-modules-yarn-v1-
- name: Install node modules
run: yarn install --immutable
- uses: actions/cache/save@v3
if: steps.cache.outputs.cache-hit != 'true'
with:
path: ./.yarn/cache
key: ${{ runner.os }}-node-modules-yarn-v1-${{ hashFiles('yarn.lock') }}
- run: yarn lint
# - run: yarn nx test
# Ensure can also build
Expand Down
27 changes: 23 additions & 4 deletions .github/workflows/web-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,30 @@ jobs:
- uses: actions/checkout@v3
with:
lfs: true
- uses: actions/setup-node@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
- run: yarn install --immutable
node-version: 18.x
#############################################################################
# Node Modules
# Manually restore any previous cache to speed install
# As immutable install will not change cache only save new cache if not hit
# Uses fine-grained methods from https://github.com/actions/cache
#############################################################################
- uses: actions/cache/restore@v3
id: cache
with:
path: ./.yarn/cache
key: ${{ runner.os }}-node-modules-yarn-v1-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-modules-yarn-v1-
- name: Install node modules
run: yarn install --immutable
- uses: actions/cache/save@v3
if: steps.cache.outputs.cache-hit != 'true'
with:
path: ./.yarn/cache
key: ${{ runner.os }}-node-modules-yarn-v1-${{ hashFiles('yarn.lock') }}
- run: yarn nx run picsa-apps-extension-app:build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
Expand Down
27 changes: 23 additions & 4 deletions .github/workflows/web-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,30 @@ jobs:
- uses: actions/checkout@v3
with:
lfs: true
- uses: actions/setup-node@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
- run: yarn install --immutable
node-version: 18.x
#############################################################################
# Node Modules
# Manually restore any previous cache to speed install
# As immutable install will not change cache only save new cache if not hit
# Uses fine-grained methods from https://github.com/actions/cache
#############################################################################
- uses: actions/cache/restore@v3
id: cache
with:
path: ./.yarn/cache
key: ${{ runner.os }}-node-modules-yarn-v1-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-modules-yarn-v1-
- name: Install node modules
run: yarn install --immutable
- uses: actions/cache/save@v3
if: steps.cache.outputs.cache-hit != 'true'
with:
path: ./.yarn/cache
key: ${{ runner.os }}-node-modules-yarn-v1-${{ hashFiles('yarn.lock') }}
- run: yarn nx run picsa-apps-extension-app:build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ libs/environments/firebase/config.prod.ts
libs/features/map/tiles/assets-for-copy
libs/features/map/tiles/**/*.png

releases/
apps/extension-toolkit/www_sourcemaps

.env
Expand Down
786 changes: 0 additions & 786 deletions .yarn/releases/yarn-3.2.1.cjs

This file was deleted.

874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.3.cjs

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
checksumBehavior: update

logFilters:
- code: YN0060
level: discard
- code: YN0002
level: discard

yarnPath: .yarn/releases/yarn-3.2.1.cjs
nodeLinker: node-modules
# Avoid throwing error installing enketo/leaflet-draw (will not match checksum)
checksumBehavior: update

yarnPath: .yarn/releases/yarn-3.6.3.cjs
42 changes: 0 additions & 42 deletions angular.json

This file was deleted.

4 changes: 2 additions & 2 deletions apps/picsa-apps/content-dashboard-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"projectType": "application",
"targets": {
"e2e": {
"executor": "@nrwl/cypress:cypress",
"executor": "@nx/cypress:cypress",
"options": {
"cypressConfig": "apps/picsa-apps/content-dashboard-e2e/cypress.json",
"devServerTarget": "picsa-apps-content-dashboard:serve:development"
Expand All @@ -17,7 +17,7 @@
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/picsa-apps/content-dashboard-e2e/**/*.{js,ts}"]
Expand Down
4 changes: 2 additions & 2 deletions apps/picsa-apps/content-dashboard/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"overrides": [
{
"files": ["*.ts"],
"extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"],
"extends": ["plugin:@nx/angular", "plugin:@angular-eslint/template/process-inline-templates"],
"rules": {
"@angular-eslint/directive-selector": [
"error",
Expand All @@ -26,7 +26,7 @@
},
{
"files": ["*.html"],
"extends": ["plugin:@nrwl/nx/angular-template"],
"extends": ["plugin:@nx/angular-template"],
"rules": {}
}
]
Expand Down
15 changes: 8 additions & 7 deletions apps/picsa-apps/content-dashboard/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ export default {
displayName: 'picsa-apps-content-dashboard',
preset: '../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
globals: {},
coverageDirectory: '../../../coverage/apps/picsa-apps/content-dashboard',
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
],
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
snapshotSerializers: [
Expand Down
4 changes: 2 additions & 2 deletions apps/picsa-apps/content-dashboard/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"options": {
"lintFilePatterns": ["apps/picsa-apps/content-dashboard/**/*.ts", "apps/picsa-apps/content-dashboard/**/*.html"]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/apps/picsa-apps/content-dashboard"],
"options": {
"jestConfig": "apps/picsa-apps/content-dashboard/jest.config.ts",
Expand Down
4 changes: 2 additions & 2 deletions apps/picsa-apps/extension-app-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"projectType": "application",
"targets": {
"e2e": {
"executor": "@nrwl/cypress:cypress",
"executor": "@nx/cypress:cypress",
"options": {
"cypressConfig": "apps/picsa-apps/extension-app-e2e/cypress.json",
"devServerTarget": "picsa-apps-extension-app:serve:development"
Expand All @@ -17,7 +17,7 @@
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/picsa-apps/extension-app-e2e/**/*.{js,ts}"]
Expand Down
3 changes: 2 additions & 1 deletion apps/picsa-apps/extension-app-native/android/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apply plugin: 'com.android.application'

android {
namespace "io.picsa.extension"
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "io.picsa.extension"
Expand Down Expand Up @@ -39,17 +40,21 @@ dependencies {
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
implementation project(':capacitor-cordova-android-plugins')

implementation(platform("com.google.firebase:firebase-bom:32.3.1"))
}

apply from: 'capacitor.build.gradle'


try {
def servicesJSON = file('google-services.json')
if (servicesJSON.text) {
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.google.firebase.firebase-perf' // Firebase Performance Monitoring plugin
apply plugin: 'com.google.firebase.crashlytics' // Firebase Crashlytics plugin
}
} catch(Exception e) {
logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
throw e
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

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

Expand Down
Loading

0 comments on commit 4368c5d

Please sign in to comment.