Skip to content

Commit e6d85f2

Browse files
authored
Merge pull request #164 from supportingami/updates/2024-09-1
Updates/2024 09 1
2 parents 38857ff + fccb0a8 commit e6d85f2

File tree

81 files changed

+17940
-12726
lines changed

Some content is hidden

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

81 files changed

+17940
-12726
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,11 @@ maths-club-app/src/environments/firebaseConfig.json
2929
maths-club-app/firebase-debug.log
3030
maths-club-app/ios/App/App/GoogleService-Info.plist
3131
maths-club-app/src/static/sitemap.xml
32+
33+
# yarn
34+
.yarn/*
35+
!.yarn/patches
36+
!.yarn/plugins
37+
!.yarn/releases
38+
!.yarn/sdks
39+
!.yarn/versions

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

TODO.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
**Update**
2+
3+
- [x] ng core 11->18
4+
- [x] mat 11->16
5+
- [x] mat 16->18
6+
- [x] sentry
7+
- [x] ngx-markdown
8+
- [ ] capacitor
9+
- [ ] yarn
10+
- [ ] misc deps
11+
- [ ] nx
12+
13+
**Content**
14+
15+
- [x] control flow migration
16+
- [ ] signals
17+
- [x] mat components
18+
- [ ] Weekly problem
19+
20+
**Actions**
21+
22+
- [ ] ....
23+
24+
**Functions**
25+
26+
- [ ] ...
27+
28+
**Docs**
29+
30+
- [ ] pre-requisites
31+
32+
**Test**
33+
34+
- [ ] animations
35+
- [ ] scroll restoration
36+
- [x] markdown (katex)
37+
- [ ] web build
38+
- [ ] android build (+cap native functions)
39+
- [ ] ios build (+cap native functions)
40+
- [ ] ios content inset (notch)
41+
42+
**IOS**
43+
44+
- [ ] Splash screen
45+
- [ ] Native functionality (share, deep links)
46+
47+
**IOS**
48+
49+
- [ ] Configure plist for status bar: https://capacitorjs.com/docs/apis/status-bar#ios-note
50+
- [ ] Enable push notification https://capacitorjs.com/docs/apis/push-notifications#ios
51+
- [ ] Check all other plugin notes
52+
- [ ] Splash screen
53+
54+
**Refactor**
55+
56+
- [ ] all components standalone
57+
- [ ] typography
58+
- [x] provide sentry error handler (see legacy app module)
59+
- [ ] lazy-load component routes
60+
- [ ] problems standalone repo (?)
61+
- [ ] material module imports to components (if standalone in mat 18)
62+
- [ ] async pipe -> signals
63+
- [ ] Dynamic links (deprecated?)
64+
- [ ] Lint rules (enforce control-flow, ordered imports)
65+
- [ ] Run prettier (write) `yarn prettier --write "**/*.{ts}"`

maths-club-app/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ speed-measure-plugin*.json
3232
.history/*
3333

3434
# misc
35+
/.angular/cache
3536
/.sass-cache
3637
/connect.lock
3738
/coverage
@@ -44,3 +45,12 @@ testem.log
4445
# System Files
4546
.DS_Store
4647
Thumbs.db
48+
49+
50+
# yarn
51+
.yarn/*
52+
!.yarn/patches
53+
!.yarn/plugins
54+
!.yarn/releases
55+
!.yarn/sdks
56+
!.yarn/versions

maths-club-app/.yarnrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

maths-club-app/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# SAMI Maths Club App
22

3+
## Pre-requisites
4+
5+
- Install [Node JS](https://nodejs.org/en/download/package-manager)
6+
- Enable yarn package manager
7+
8+
```sh
9+
corepack enable
10+
```
11+
12+
- Install dependencies
13+
14+
```sh
15+
yarn install
16+
```
17+
18+
## Run on Web
19+
20+
```sh
21+
yarn start
22+
```
23+
324
## Running on android
425

526
First you must add the android platform for the build

maths-club-app/android/.gitignore

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
# NPM renames .gitignore to .npmignore
2-
# In order to prevent that, we remove the initial "."
3-
# And the CLI then renames it
4-
5-
# Using Android gitignore template: https://github.com/github/gitignore/blob/master/Android.gitignore
1+
# Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore
62

73
# Built application files
84
*.apk
5+
*.aar
96
*.ap_
107
*.aab
118

@@ -19,7 +16,8 @@
1916
bin/
2017
gen/
2118
out/
22-
release/
19+
# Uncomment the following line in case you need and you don't have the release build type files in your app
20+
# release/
2321

2422
# Gradle files
2523
.gradle/
@@ -61,6 +59,10 @@ captures/
6159

6260
# External native build folder generated in Android Studio 2.2 and later
6361
.externalNativeBuild
62+
.cxx/
63+
64+
# Google Services (e.g. APIs or Firebase)
65+
# google-services.json
6466

6567
# Freeline
6668
freeline.py
@@ -84,8 +86,16 @@ lint/outputs/
8486
lint/tmp/
8587
# lint/reports/
8688

89+
# Android Profiling
90+
*.hprof
91+
8792
# Cordova plugins for Capacitor
8893
capacitor-cordova-android-plugins
8994

9095
# Copied web assets
9196
app/src/main/assets/public
97+
98+
# Generated Config files
99+
app/src/main/assets/capacitor.config.json
100+
app/src/main/assets/capacitor.plugins.json
101+
app/src/main/res/xml/config.xml
Lines changed: 14 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
apply plugin: 'com.android.application'
2-
apply plugin: 'kotlin-android'
3-
apply plugin: 'com.google.gms.google-services' // Google Services plugin
42

53
android {
6-
compileSdkVersion rootProject.ext.compileSdkVersion
4+
namespace "io.c2dev.samimathsclub"
5+
compileSdk rootProject.ext.compileSdkVersion
76
defaultConfig {
87
applicationId "io.c2dev.samimathsclub"
98
minSdkVersion rootProject.ext.minSdkVersion
109
targetSdkVersion rootProject.ext.targetSdkVersion
11-
versionCode 2007002
12-
versionName "2.7.2"
10+
versionCode 3000000
11+
versionName "3.0.0"
1312
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
13+
aaptOptions {
14+
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
15+
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
16+
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
17+
}
1418
}
1519
buildTypes {
1620
release {
@@ -24,47 +28,18 @@ repositories {
2428
flatDir{
2529
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
2630
}
27-
mavenCentral()
2831
}
2932

3033
dependencies {
3134
implementation fileTree(include: ['*.jar'], dir: 'libs')
3235
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
36+
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
37+
implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
3338
implementation project(':capacitor-android')
3439
testImplementation "junit:junit:$junitVersion"
35-
// androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
36-
// androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
40+
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
41+
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
3742
implementation project(':capacitor-cordova-android-plugins')
38-
implementation 'com.google.firebase:firebase-messaging:20.2.4'
39-
// androidTestImplementation 'androidx.test:rules:1.3.0-alpha03'
40-
// implementation "androidx.core:core-ktx:+"
41-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
42-
43-
// Testing (overrides many of the above)
44-
// TODO - should be moved to separate build for test package
45-
androidTestImplementation 'tools.fastlane:screengrab:2.0.0'
46-
// Core library
47-
androidTestImplementation 'androidx.test:core:1.3.0'
48-
// AndroidJUnitRunner and JUnit Rules
49-
androidTestImplementation 'androidx.test:runner:1.3.0'
50-
androidTestImplementation 'androidx.test:rules:1.3.0'
51-
// Assertions
52-
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
53-
androidTestImplementation 'androidx.test.ext:truth:1.3.0'
54-
androidTestImplementation 'com.google.truth:truth:0.42'
55-
// Espresso dependencies
56-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
57-
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.2.0'
58-
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0'
59-
androidTestImplementation 'androidx.test.espresso:espresso-accessibility:3.2.0'
60-
androidTestImplementation 'androidx.test.espresso:espresso-web:3.2.0'
61-
androidTestImplementation 'androidx.test.espresso.idling:idling-concurrent:3.2.0'
62-
// The following Espresso dependency can be either "implementation"
63-
// or "androidTestImplementation", depending on whether you want the
64-
// dependency to appear on your APK's compile classpath or the test APK
65-
// classpath.
66-
androidTestImplementation 'androidx.test.espresso:espresso-idling-resource:3.2.0'
67-
6843
}
6944

7045
apply from: 'capacitor.build.gradle'
@@ -75,5 +50,5 @@ try {
7550
apply plugin: 'com.google.gms.google-services'
7651
}
7752
} catch(Exception e) {
78-
logger.warn("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
53+
logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
7954
}

maths-club-app/android/app/capacitor.build.gradle

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
11
package com.getcapacitor.myapp;
22

3-
import android.content.Context;
3+
import static org.junit.Assert.*;
44

5-
import androidx.test.platform.app.InstrumentationRegistry;
5+
import android.content.Context;
66
import androidx.test.ext.junit.runners.AndroidJUnit4;
7-
7+
import androidx.test.platform.app.InstrumentationRegistry;
88
import org.junit.Test;
99
import org.junit.runner.RunWith;
1010

11-
import static org.junit.Assert.*;
12-
1311
/**
1412
* Instrumented test, which will execute on an Android device.
1513
*
1614
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
1715
*/
1816
@RunWith(AndroidJUnit4.class)
1917
public class ExampleInstrumentedTest {
20-
@Test
21-
public void useAppContext() throws Exception {
22-
// Context of the app under test.
23-
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
2418

25-
assertEquals("com.getcapacitor.app", appContext.getPackageName());
26-
}
19+
@Test
20+
public void useAppContext() throws Exception {
21+
// Context of the app under test.
22+
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
23+
24+
assertEquals("com.getcapacitor.app", appContext.getPackageName());
25+
}
2726
}

0 commit comments

Comments
 (0)