Compare commits
349 Commits
Author | SHA1 | Date | |
---|---|---|---|
7bbe321d3c | |||
9db49a4164 | |||
1d2f4f70c8 | |||
d1eecad059 | |||
d5e9c6ecc3 | |||
b91ddc172d | |||
5417796f3f | |||
78c895547e | |||
1f0f280286 | |||
b280465914 | |||
967ae915b2 | |||
24cd1692c6 | |||
63bc71c405 | |||
a43a3b441f | |||
ab4b40ab75 | |||
e9c5c5fb99 | |||
b989a8359e | |||
6ec1d80f49 | |||
c1e465020f | |||
b687464d59 | |||
3239a075fb | |||
8c0f0e3e8f | |||
aac34ef738 | |||
e96be86314 | |||
95353735b0 | |||
c0b8a8a3f4 | |||
301240b896 | |||
86b8c47ed5 | |||
bc99f46720 | |||
9c53cc52e9 | |||
e6709cd4af | |||
cdb92757aa | |||
3c5da802a7 | |||
05e2fcf185 | |||
8ebd95a4b8 | |||
80d4e18a23 | |||
cc672d2f20 | |||
1cf14e65a9 | |||
9b2e429d3d | |||
2f73a21a41 | |||
05eb37bc80 | |||
779c86d8ac | |||
d9a14c9973 | |||
7546c2a1a4 | |||
d21d775764 | |||
352f1ca0d1 | |||
584a9e983f | |||
5dd94eca38 | |||
d8c06e3de2 | |||
3adeadf6fb | |||
9d35916280 | |||
4c7632a144 | |||
e329e13a02 | |||
7ddaf5d9aa | |||
5da4c3d3b9 | |||
fb1560a1f5 | |||
61d62f736c | |||
77362f1651 | |||
fbb9cf68ab | |||
ce641a3ffe | |||
527a659a1b | |||
6d432b9de4 | |||
23a9506dda | |||
be05bfadec | |||
1971b07d39 | |||
ca05d6e3cc | |||
c204dc5a8b | |||
55d0dea835 | |||
e93d125431 | |||
74a935f6f1 | |||
be7035978b | |||
778451fa4c | |||
89d1e0f641 | |||
1f9b65652d | |||
2b23404461 | |||
e2dbe8866d | |||
7dad61dbbb | |||
9542405512 | |||
59d28d3c49 | |||
600f3365f6 | |||
5b8a1e86e0 | |||
c8bc7665f7 | |||
0bbe5fc7fa | |||
e9ea573e33 | |||
e6fbf85e6e | |||
b68f3bdb23 | |||
63c25317eb | |||
b0a6736f70 | |||
c68a53e4cd | |||
c4773d7b97 | |||
eea219a205 | |||
35ab9a26c0 | |||
9c366399df | |||
8126327b95 | |||
beb1005710 | |||
431d91a380 | |||
35771c11e7 | |||
2ccdb8b238 | |||
dac268f40b | |||
80b1351bd2 | |||
64709920f7 | |||
b00ba83370 | |||
243a274480 | |||
95d51c82e9 | |||
549311535c | |||
8e0c8e825b | |||
3bae320e07 | |||
ac299ec7ba | |||
ec506a7f9e | |||
e397f009b9 | |||
0560330f68 | |||
a078ecaf7e | |||
d662a6c426 | |||
16d97ad08f | |||
189c3ab273 | |||
0b7fb533da | |||
4c02afb957 | |||
7553e1f51e | |||
d5d89ee93a | |||
dfcee5dfc7 | |||
0ad82bb248 | |||
38e1c1133d | |||
97a834ae6a | |||
6b7bf600f8 | |||
f9dbbf4638 | |||
dae5182f90 | |||
51e89ce901 | |||
72be45feb4 | |||
7e347a70c2 | |||
227d7871c2 | |||
f5813a5489 | |||
34925b6678 | |||
20358a700a | |||
373683bbf0 | |||
77cfe75043 | |||
56d49d8c5e | |||
1286a5d848 | |||
463e7ee287 | |||
46897cc51b | |||
306d9a006a | |||
7e798eb606 | |||
0bc064b4ba | |||
35a97be4c4 | |||
9f3e183d72 | |||
51f5f1005a | |||
0a380f861e | |||
b712ad3488 | |||
9f656bdefe | |||
a4a651229c | |||
4773800f23 | |||
bef0b8189e | |||
674714f0f3 | |||
ee9e858584 | |||
165c6d8614 | |||
8a6719fc19 | |||
308361a834 | |||
44df964f6f | |||
56bf266919 | |||
f3658d6636 | |||
1bb37eec30 | |||
59511b2345 | |||
5b7bc02c61 | |||
b329f537e7 | |||
5879e81759 | |||
f4e88bef77 | |||
b3ec45309c | |||
2fbc892898 | |||
c46190c3fc | |||
860e540de1 | |||
8cde286cac | |||
90830fe384 | |||
686f89f75d | |||
4210af5680 | |||
aefc368cfd | |||
67218d8045 | |||
c05deb3a41 | |||
43d0107fb5 | |||
ece7612f9d | |||
a9809d90cb | |||
bbc9a79996 | |||
b71f1885ec | |||
885aad2047 | |||
7121afab08 | |||
d9a4c4ffd6 | |||
fb826919a6 | |||
22720169a2 | |||
7fefd251db | |||
5de4f67344 | |||
d396a12d68 | |||
3888c91a6b | |||
562bac6987 | |||
e825b4dd85 | |||
08587b7a7a | |||
0daca2cf8f | |||
3a9b15c2be | |||
e9b4db0f1c | |||
312a31ce9e | |||
d4a8a2e720 | |||
dcb4f253d8 | |||
d0a04bae84 | |||
34ac96edd7 | |||
b42ce84c3e | |||
2db779b44f | |||
397bfe78aa | |||
efaad3f97c | |||
624c613bd1 | |||
07b0632c95 | |||
3d1e6cfa17 | |||
3db636d41a | |||
2053b8f07f | |||
b1681b53e4 | |||
03f60ff316 | |||
b2df0a5a02 | |||
8826cb0312 | |||
a0c72f5b94 | |||
7d9a58ae54 | |||
fd72b512f8 | |||
28c2721036 | |||
a1788bf75a | |||
b1bd278f9b | |||
16f6ab4861 | |||
01934e29b1 | |||
d1cefb0150 | |||
27b189d33a | |||
e05d88682a | |||
2a5f1f5f7e | |||
e7a45d9a05 | |||
ec9a326002 | |||
23c7729fcf | |||
7fcd324299 | |||
1633449638 | |||
57231a1406 | |||
2eb6292733 | |||
ff24493ff3 | |||
3d602af135 | |||
590665a5e9 | |||
89fd0dfed7 | |||
82bc887767 | |||
acd7de0dee | |||
e737cd9d5c | |||
0ec7a9d274 | |||
e49d9159e4 | |||
3343285761 | |||
14bba38324 | |||
679277d59e | |||
cebb2ae2b6 | |||
56d9f977ae | |||
984470b47d | |||
0112d681ac | |||
0cb2a977a0 | |||
f65c231ba0 | |||
dbc014f819 | |||
bbf7962e29 | |||
2b4d77bab4 | |||
8582674b44 | |||
f7675be834 | |||
00d77e508d | |||
e90cfe34e9 | |||
54dfd535a4 | |||
5a02eb6d18 | |||
97fc9319d1 | |||
03b4acd13e | |||
86f06a3c6a | |||
06e8d2a6e2 | |||
99f248a8ce | |||
c7aaa6ad98 | |||
cb5ce66c1a | |||
0750bf1d8a | |||
203360e8b5 | |||
ef1844109f | |||
de6ad35f60 | |||
fbb289dedf | |||
f1e87170f0 | |||
66ecad27a7 | |||
98b1e8bd80 | |||
26cd1533b4 | |||
3692b915f3 | |||
06788c3e12 | |||
edfcdd1135 | |||
dd2f3baa0c | |||
7db70e392b | |||
0cae24a612 | |||
8db0fa37db | |||
d27e3d9a91 | |||
fa5a4107a6 | |||
234188c4d4 | |||
9b700581f3 | |||
12db23d076 | |||
fd182f0abb | |||
7eab74e65c | |||
e0ecd4d9ff | |||
1ca09c16d3 | |||
a7df476e79 | |||
4e5eac6178 | |||
91a6808ad2 | |||
11a6517156 | |||
7aa7eb234d | |||
62d7df9710 | |||
0ff1188c3d | |||
b6e8d037a0 | |||
7a11b2c76f | |||
7f56dbdbfa | |||
df4eb15df8 | |||
ac9ae06cc8 | |||
464cf3ec7e | |||
bf0ce5c963 | |||
3a0c65a849 | |||
6d80638cf8 | |||
37e09d6532 | |||
8ea3fdcfef | |||
1bc847cdc9 | |||
03c35d6446 | |||
d5aea1a828 | |||
f17ddb4ace | |||
0cc6e27267 | |||
ca58aa782d | |||
e8671e8650 | |||
d46601be5c | |||
d30e2cefc0 | |||
08a93551e7 | |||
c2899fd727 | |||
5ec66e1777 | |||
516809cd02 | |||
0d3526221d | |||
728b12107f | |||
b56c021356 | |||
80f3b982d2 | |||
0d641b727f | |||
8278c059ad | |||
7af0ff5413 | |||
5c2877bdb8 | |||
85bfe79115 | |||
fb37f94c0a | |||
e53f40866e | |||
650ba20e5d | |||
6e01c41c22 | |||
f555f0f1cf | |||
35ef2175bc | |||
55f53deadf | |||
5991631bfa | |||
34a27d9ca4 | |||
1671490485 | |||
0e58a5c5f0 | |||
![]() |
bd11d7973c | ||
f3b5b09ed0 | |||
ce641bf7d2 | |||
f1c7314dca | |||
019408dc6d | |||
![]() |
cdba3540c2 |
101
.gitea/workflows/build_and_deploy.yml
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
|
||||||
|
# https://docs.gitea.com/next/usage/actions/quickstart
|
||||||
|
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
|
||||||
|
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
|
||||||
|
|
||||||
|
# Configurable with a few commit messages:
|
||||||
|
# - [skip-tests] Skip the test stage
|
||||||
|
# - [skip-deployment] Skip the deployment stage
|
||||||
|
# - [skip-ci] Skip all stages (the whole ci/cd)
|
||||||
|
#
|
||||||
|
|
||||||
|
name: Build Docker and Deploy
|
||||||
|
run-name: Build & Deploy ${{ gitea.ref }} on ${{ gitea.actor }}
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ['master']
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_server:
|
||||||
|
name: Build Docker Container
|
||||||
|
runs-on: bfb-cicd-latest
|
||||||
|
if: >-
|
||||||
|
!contains(github.event.head_commit.message, '[skip-ci]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip-deployment]')
|
||||||
|
steps:
|
||||||
|
- run: echo -n "${{ secrets.DOCKER_REG_PASS }}" | docker login registry.blackforestbytes.com -u docker --password-stdin
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- run: cd "${{ gitea.workspace }}/scnserver" && make clean
|
||||||
|
- run: cd "${{ gitea.workspace }}/scnserver" && make docker
|
||||||
|
- run: cd "${{ gitea.workspace }}/scnserver" && make push-docker
|
||||||
|
|
||||||
|
test_server:
|
||||||
|
name: Run Unit-Tests
|
||||||
|
runs-on: bfb-cicd-latest
|
||||||
|
if: >-
|
||||||
|
!contains(github.event.head_commit.message, '[skip-ci]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip-tests]')
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Get Commiter Info
|
||||||
|
id: commiter_info
|
||||||
|
run: |
|
||||||
|
echo "NAME=$( git log -n 1 --pretty=format:%an )" >> $GITHUB_OUTPUT
|
||||||
|
echo "MAIL=$( git log -n 1 --pretty=format:%ae )" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version-file: '${{ gitea.workspace }}/scnserver/go.mod'
|
||||||
|
cache: false
|
||||||
|
|
||||||
|
- name: Print Go Version
|
||||||
|
run: go version
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: cd "${{ gitea.workspace }}/scnserver" && make dgi && make swagger && SCN_TEST_LOGLEVEL=WARN make test
|
||||||
|
|
||||||
|
- name: Send failure mail
|
||||||
|
if: failure()
|
||||||
|
uses: dawidd6/action-send-mail@v3
|
||||||
|
with:
|
||||||
|
server_address: smtp.fastmail.com
|
||||||
|
server_port: 465
|
||||||
|
secure: true
|
||||||
|
username: ${{secrets.MAIL_USERNAME}}
|
||||||
|
password: ${{secrets.MAIL_PASSWORD}}
|
||||||
|
subject: Pipeline on '${{ gitea.repository }}' failed
|
||||||
|
to: ${{ steps.commiter_info.outputs.MAIL }}
|
||||||
|
from: Gitea Actions <gitea_actions@blackforestbytes.de>
|
||||||
|
body: "Go to https://gogs.blackforestbytes.com/${{ gitea.repository }}/actions"
|
||||||
|
|
||||||
|
deploy_server:
|
||||||
|
name: Deploy to Server
|
||||||
|
needs: [build_server, test_server]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: >-
|
||||||
|
!cancelled() &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip-ci]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip-deployment]') &&
|
||||||
|
needs.build_server.result == 'success' &&
|
||||||
|
(needs.test_server.result == 'skipped' || needs.test_server.result == 'success')
|
||||||
|
steps:
|
||||||
|
- name: Execute deploy on remote (via ssh)
|
||||||
|
uses: appleboy/ssh-action@v1.0.0
|
||||||
|
with:
|
||||||
|
host: simplecloudnotifier.de
|
||||||
|
username: bfb-deploy-bot
|
||||||
|
port: 4477
|
||||||
|
key: "${{ secrets.SSH_KEY_BFBDEPLOYBOT }}"
|
||||||
|
script: cd /var/docker/deploy-scripts/simplecloudnotifier && ./deploy.sh master "${{ gitea.sha }}" || exit 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.aider*
|
6
android/.idea/AndroidProjectSystem.xml
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="AndroidProjectSystem">
|
||||||
|
<option name="providerId" value="com.android.tools.idea.GradleProjectSystem" />
|
||||||
|
</component>
|
||||||
|
</project>
|
10
android/.idea/deploymentTargetDropDown.xml
generated
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="deploymentTargetDropDown">
|
||||||
|
<value>
|
||||||
|
<entry key="app">
|
||||||
|
<State />
|
||||||
|
</entry>
|
||||||
|
</value>
|
||||||
|
</component>
|
||||||
|
</project>
|
10
android/.idea/deploymentTargetSelector.xml
generated
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="deploymentTargetSelector">
|
||||||
|
<selectionStates>
|
||||||
|
<SelectionState runConfigName="app">
|
||||||
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
|
</SelectionState>
|
||||||
|
</selectionStates>
|
||||||
|
</component>
|
||||||
|
</project>
|
40
android/.idea/jarRepositories.xml
generated
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RemoteRepositoriesConfiguration">
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Maven Central repository" />
|
||||||
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="jboss.community" />
|
||||||
|
<option name="name" value="JBoss Community repository" />
|
||||||
|
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="maven2" />
|
||||||
|
<option name="name" value="maven2" />
|
||||||
|
<option name="url" value="https://dl.bintray.com/gericop/maven" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="maven3" />
|
||||||
|
<option name="name" value="maven3" />
|
||||||
|
<option name="url" value="https://maven.google.com" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="BintrayJCenter" />
|
||||||
|
<option name="name" value="BintrayJCenter" />
|
||||||
|
<option name="url" value="https://jcenter.bintray.com/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="maven" />
|
||||||
|
<option name="name" value="maven" />
|
||||||
|
<option name="url" value="https://jitpack.io" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="Google" />
|
||||||
|
<option name="name" value="Google" />
|
||||||
|
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
|
||||||
|
</remote-repository>
|
||||||
|
</component>
|
||||||
|
</project>
|
10
android/.idea/migrations.xml
generated
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectMigrations">
|
||||||
|
<option name="MigrateToGradleLocalJavaHome">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
11
android/.idea/runConfigurations.xml
generated
@ -3,9 +3,14 @@
|
|||||||
<component name="RunConfigurationProducerService">
|
<component name="RunConfigurationProducerService">
|
||||||
<option name="ignoredProducers">
|
<option name="ignoredProducers">
|
||||||
<set>
|
<set>
|
||||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
|
<option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" />
|
||||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
|
<option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" />
|
||||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
|
<option value="com.intellij.execution.junit.PatternConfigurationProducer" />
|
||||||
|
<option value="com.intellij.execution.junit.TestInClassConfigurationProducer" />
|
||||||
|
<option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" />
|
||||||
|
<option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" />
|
||||||
|
<option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" />
|
||||||
|
<option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" />
|
||||||
</set>
|
</set>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 28
|
compileSdkVersion 30
|
||||||
|
|
||||||
def versionPropsFile = file('version.properties')
|
def versionPropsFile = file('version.properties')
|
||||||
def vNumber
|
def vNumber
|
||||||
@ -16,7 +16,7 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.blackforestbytes.simplecloudnotifier"
|
applicationId "com.blackforestbytes.simplecloudnotifier"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 28
|
targetSdkVersion 30
|
||||||
versionCode vNumber
|
versionCode vNumber
|
||||||
versionName vName
|
versionName vName
|
||||||
}
|
}
|
||||||
@ -30,35 +30,39 @@ android {
|
|||||||
targetCompatibility 1.8
|
targetCompatibility 1.8
|
||||||
sourceCompatibility 1.8
|
sourceCompatibility 1.8
|
||||||
}
|
}
|
||||||
|
namespace 'com.blackforestbytes.simplecloudnotifier'
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.0.2'
|
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||||
implementation 'androidx.cardview:cardview:1.0.0'
|
implementation 'androidx.cardview:cardview:1.0.0'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||||
implementation 'androidx.recyclerview:recyclerview:1.0.0'
|
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||||
implementation 'androidx.recyclerview:recyclerview:1.0.0'
|
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
|
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||||
|
|
||||||
implementation 'com.google.android.material:material:1.0.0'
|
implementation 'com.google.android.material:material:1.2.1'
|
||||||
implementation 'com.google.firebase:firebase-core:16.0.6'
|
implementation 'com.google.firebase:firebase-core:18.0.0'
|
||||||
implementation 'com.google.firebase:firebase-messaging:17.3.4'
|
implementation 'com.google.firebase:firebase-messaging:21.0.0'
|
||||||
implementation 'com.google.android.gms:play-services-ads:17.1.2'
|
implementation 'com.google.android.gms:play-services-ads:19.5.0'
|
||||||
implementation 'com.android.billingclient:billing:1.2'
|
implementation 'com.android.billingclient:billing:3.0.1'
|
||||||
|
|
||||||
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
|
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
|
||||||
implementation 'com.github.kenglxn.QRGen:android:2.5.0'
|
implementation 'com.github.kenglxn.QRGen:android:2.5.0'
|
||||||
implementation "com.github.DeweyReed:UltimateMusicPicker:2.0.0"
|
implementation "com.github.DeweyReed:UltimateMusicPicker:2.0.0"
|
||||||
implementation 'com.github.duanhong169:colorpicker:1.1.5'
|
implementation 'com.github.duanhong169:colorpicker:1.1.5'
|
||||||
|
|
||||||
implementation 'net.danlew:android.joda:2.9.9.2'
|
implementation 'net.danlew:android.joda:2.10.7.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.google.gms.google-services'
|
apply plugin: 'com.google.gms.google-services'
|
||||||
|
|
||||||
task updateVersion << {
|
tasks.register("updateVersion") {
|
||||||
|
group = 'Custom'
|
||||||
|
|
||||||
|
doLast {
|
||||||
def lastTag = ['git', 'describe', "--abbrev=0", "--tags"].execute().text.trim()
|
def lastTag = ['git', 'describe', "--abbrev=0", "--tags"].execute().text.trim()
|
||||||
|
|
||||||
def versionPropsFile = file('version.properties')
|
def versionPropsFile = file('version.properties')
|
||||||
@ -109,4 +113,5 @@ task updateVersion << {
|
|||||||
|
|
||||||
versionPropsFile.newWriter().withCloseable { w -> versionProps.store(w, null) }
|
versionPropsFile.newWriter().withCloseable { w -> versionProps.store(w, null) }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
package="com.blackforestbytes.simplecloudnotifier">
|
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
|
@ -10,7 +10,7 @@ import com.blackforestbytes.simplecloudnotifier.SCNApp;
|
|||||||
import com.blackforestbytes.simplecloudnotifier.lib.datatypes.Tuple3;
|
import com.blackforestbytes.simplecloudnotifier.lib.datatypes.Tuple3;
|
||||||
import com.blackforestbytes.simplecloudnotifier.lib.string.Str;
|
import com.blackforestbytes.simplecloudnotifier.lib.string.Str;
|
||||||
import com.blackforestbytes.simplecloudnotifier.service.IABService;
|
import com.blackforestbytes.simplecloudnotifier.service.IABService;
|
||||||
import com.google.firebase.iid.FirebaseInstanceId;
|
import com.google.firebase.installations.FirebaseInstallations;
|
||||||
|
|
||||||
public class SCNSettings
|
public class SCNSettings
|
||||||
{
|
{
|
||||||
@ -182,13 +182,13 @@ public class SCNSettings
|
|||||||
return base + "index.php?preset_user_id="+user_id+"&preset_user_key="+user_key;
|
return base + "index.php?preset_user_id="+user_id+"&preset_user_key="+user_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setServerToken(String token, View loader)
|
public void setServerToken(String token, View loader, boolean force)
|
||||||
{
|
{
|
||||||
if (isConnected())
|
if (isConnected())
|
||||||
{
|
{
|
||||||
fcm_token_local = token;
|
fcm_token_local = token;
|
||||||
save();
|
save();
|
||||||
if (!fcm_token_local.equals(fcm_token_server)) ServerCommunication.updateFCMToken(user_id, user_key, fcm_token_local, loader);
|
if (!fcm_token_local.equals(fcm_token_server) || force) ServerCommunication.updateFCMToken(user_id, user_key, fcm_token_local, loader);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -200,13 +200,12 @@ public class SCNSettings
|
|||||||
}
|
}
|
||||||
|
|
||||||
// called at app start
|
// called at app start
|
||||||
public void work(Activity a)
|
public void work(Activity a, boolean force)
|
||||||
{
|
{
|
||||||
FirebaseInstanceId.getInstance().getInstanceId().addOnSuccessListener(a, instanceIdResult ->
|
FirebaseInstallations.getInstance().getId().addOnSuccessListener(a, newToken ->
|
||||||
{
|
{
|
||||||
String newToken = instanceIdResult.getToken();
|
|
||||||
Log.d("FB::GetInstanceId", newToken);
|
Log.d("FB::GetInstanceId", newToken);
|
||||||
SCNSettings.inst().setServerToken(newToken, null);
|
SCNSettings.inst().setServerToken(newToken, null, force);
|
||||||
}).addOnCompleteListener(r ->
|
}).addOnCompleteListener(r ->
|
||||||
{
|
{
|
||||||
if (isConnected()) ServerCommunication.info(user_id, user_key, null);
|
if (isConnected()) ServerCommunication.info(user_id, user_key, null);
|
||||||
@ -232,16 +231,15 @@ public class SCNSettings
|
|||||||
|
|
||||||
if (promode_server != promode_local) updateProState(loader);
|
if (promode_server != promode_local) updateProState(loader);
|
||||||
|
|
||||||
if (!Str.equals(fcm_token_local, fcm_token_server)) work(a);
|
if (!Str.equals(fcm_token_local, fcm_token_server)) work(a, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// get token then register
|
// get token then register
|
||||||
FirebaseInstanceId.getInstance().getInstanceId().addOnSuccessListener(a, instanceIdResult ->
|
FirebaseInstallations.getInstance().getId().addOnSuccessListener(a, newToken ->
|
||||||
{
|
{
|
||||||
String newToken = instanceIdResult.getToken();
|
|
||||||
Log.d("FB::GetInstanceId", newToken);
|
Log.d("FB::GetInstanceId", newToken);
|
||||||
SCNSettings.inst().setServerToken(newToken, loader); // does register in here
|
SCNSettings.inst().setServerToken(newToken, loader, false); // does register in here
|
||||||
}).addOnCompleteListener(r ->
|
}).addOnCompleteListener(r ->
|
||||||
{
|
{
|
||||||
if (isConnected()) ServerCommunication.info(user_id, user_key, null); // info again for safety
|
if (isConnected()) ServerCommunication.info(user_id, user_key, null); // info again for safety
|
||||||
|
@ -68,6 +68,7 @@ public class ServerCommunication
|
|||||||
if (!json_bool(json, "success"))
|
if (!json_bool(json, "success"))
|
||||||
{
|
{
|
||||||
SCNApp.showToast(json_str(json, "message"), 4000);
|
SCNApp.showToast(json_str(json, "message"), 4000);
|
||||||
|
handleNonSuccess("register", call, response, r);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,6 +135,7 @@ public class ServerCommunication
|
|||||||
if (!json_bool(json, "success"))
|
if (!json_bool(json, "success"))
|
||||||
{
|
{
|
||||||
SCNApp.showToast(json_str(json, "message"), 4000);
|
SCNApp.showToast(json_str(json, "message"), 4000);
|
||||||
|
handleNonSuccess("update<1>", call, response, r);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,6 +202,7 @@ public class ServerCommunication
|
|||||||
|
|
||||||
if (!json_bool(json, "success")) {
|
if (!json_bool(json, "success")) {
|
||||||
SCNApp.showToast(json_str(json, "message"), 4000);
|
SCNApp.showToast(json_str(json, "message"), 4000);
|
||||||
|
handleNonSuccess("update<2>", call, response, r);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -269,6 +272,7 @@ public class ServerCommunication
|
|||||||
if (!json_bool(json, "success"))
|
if (!json_bool(json, "success"))
|
||||||
{
|
{
|
||||||
SCNApp.showToast(json_str(json, "message"), 4000);
|
SCNApp.showToast(json_str(json, "message"), 4000);
|
||||||
|
handleNonSuccess("info", call, response, r);
|
||||||
|
|
||||||
int errid = json.optInt("errid", 0);
|
int errid = json.optInt("errid", 0);
|
||||||
|
|
||||||
@ -356,6 +360,7 @@ public class ServerCommunication
|
|||||||
if (!json_bool(json, "success"))
|
if (!json_bool(json, "success"))
|
||||||
{
|
{
|
||||||
SCNApp.showToast(json_str(json, "message"), 4000);
|
SCNApp.showToast(json_str(json, "message"), 4000);
|
||||||
|
handleNonSuccess("requery", call, response, r);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -420,8 +425,7 @@ public class ServerCommunication
|
|||||||
String r = Str.Empty;
|
String r = Str.Empty;
|
||||||
try (ResponseBody responseBody = response.body())
|
try (ResponseBody responseBody = response.body())
|
||||||
{
|
{
|
||||||
if (!response.isSuccessful())
|
if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
|
||||||
throw new IOException("Unexpected code " + response);
|
|
||||||
if (responseBody == null) throw new IOException("No response");
|
if (responseBody == null) throw new IOException("No response");
|
||||||
|
|
||||||
r = responseBody.string();
|
r = responseBody.string();
|
||||||
@ -431,6 +435,7 @@ public class ServerCommunication
|
|||||||
|
|
||||||
if (!json_bool(json, "success")) {
|
if (!json_bool(json, "success")) {
|
||||||
SCNApp.showToast(json_str(json, "message"), 4000);
|
SCNApp.showToast(json_str(json, "message"), 4000);
|
||||||
|
handleNonSuccess("upgrade", call, response, r);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -492,7 +497,11 @@ public class ServerCommunication
|
|||||||
|
|
||||||
JSONObject json = (JSONObject) new JSONTokener(r).nextValue();
|
JSONObject json = (JSONObject) new JSONTokener(r).nextValue();
|
||||||
|
|
||||||
if (!json_bool(json, "success")) SCNApp.showToast(json_str(json, "message"), 4000);
|
if (!json_bool(json, "success"))
|
||||||
|
{
|
||||||
|
SCNApp.showToast(json_str(json, "message"), 4000);
|
||||||
|
handleNonSuccess("ack", call, response, r);
|
||||||
|
}
|
||||||
|
|
||||||
handleSuccess("ack", call, response, r);
|
handleSuccess("ack", call, response, r);
|
||||||
}
|
}
|
||||||
@ -542,6 +551,7 @@ public class ServerCommunication
|
|||||||
if (!json_bool(json, "success"))
|
if (!json_bool(json, "success"))
|
||||||
{
|
{
|
||||||
SCNApp.showToast(json_str(json, "message"), 4000);
|
SCNApp.showToast(json_str(json, "message"), 4000);
|
||||||
|
handleNonSuccess("expand", call, response, r);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -621,6 +631,28 @@ public class ServerCommunication
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void handleNonSuccess(String source, Call call, Response resp, String respBody)
|
||||||
|
{
|
||||||
|
Log.d("SC:"+source, respBody);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Instant i = Instant.now();
|
||||||
|
String s = source;
|
||||||
|
String u = call.request().url().toString();
|
||||||
|
int rc = resp.code();
|
||||||
|
String r = respBody;
|
||||||
|
LogLevel l = LogLevel.WARN;
|
||||||
|
|
||||||
|
SingleQuery q = new SingleQuery(l, i, s, u, r, rc, "NON-SUCCESS");
|
||||||
|
QueryLog.inst().add(q);
|
||||||
|
}
|
||||||
|
catch (Exception e2)
|
||||||
|
{
|
||||||
|
Log.e("SC:HandleSuccess", e2.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void handleError(String source, Call call, Response resp, String respBody, boolean isio, Exception e)
|
private static void handleError(String source, Call call, Response resp, String respBody, boolean isio, Exception e)
|
||||||
{
|
{
|
||||||
Log.e("SC:"+source, e.toString());
|
Log.e("SC:"+source, e.toString());
|
||||||
|
@ -9,8 +9,12 @@ import android.widget.Toast;
|
|||||||
import com.android.billingclient.api.BillingClient;
|
import com.android.billingclient.api.BillingClient;
|
||||||
import com.android.billingclient.api.BillingClientStateListener;
|
import com.android.billingclient.api.BillingClientStateListener;
|
||||||
import com.android.billingclient.api.BillingFlowParams;
|
import com.android.billingclient.api.BillingFlowParams;
|
||||||
|
import com.android.billingclient.api.BillingResult;
|
||||||
import com.android.billingclient.api.Purchase;
|
import com.android.billingclient.api.Purchase;
|
||||||
import com.android.billingclient.api.PurchasesUpdatedListener;
|
import com.android.billingclient.api.PurchasesUpdatedListener;
|
||||||
|
import com.android.billingclient.api.SkuDetails;
|
||||||
|
import com.android.billingclient.api.SkuDetailsParams;
|
||||||
|
import com.android.billingclient.api.SkuDetailsResponseListener;
|
||||||
import com.blackforestbytes.simplecloudnotifier.SCNApp;
|
import com.blackforestbytes.simplecloudnotifier.SCNApp;
|
||||||
import com.blackforestbytes.simplecloudnotifier.lib.datatypes.Tuple2;
|
import com.blackforestbytes.simplecloudnotifier.lib.datatypes.Tuple2;
|
||||||
import com.blackforestbytes.simplecloudnotifier.lib.datatypes.Tuple3;
|
import com.blackforestbytes.simplecloudnotifier.lib.datatypes.Tuple3;
|
||||||
@ -20,11 +24,15 @@ import com.blackforestbytes.simplecloudnotifier.model.SCNSettings;
|
|||||||
import com.blackforestbytes.simplecloudnotifier.view.MainActivity;
|
import com.blackforestbytes.simplecloudnotifier.view.MainActivity;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.Dictionary;
|
import java.util.Dictionary;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import static androidx.constraintlayout.widget.Constraints.TAG;
|
import static androidx.constraintlayout.widget.Constraints.TAG;
|
||||||
@ -58,7 +66,7 @@ public class IABService implements PurchasesUpdatedListener
|
|||||||
private final List<Purchase> purchases = new ArrayList<>();
|
private final List<Purchase> purchases = new ArrayList<>();
|
||||||
private boolean _isInitialized = false;
|
private boolean _isInitialized = false;
|
||||||
|
|
||||||
private Map<String, Boolean> _localCache= new HashMap<>();
|
private final Map<String, Boolean> _localCache= new HashMap<>();
|
||||||
|
|
||||||
public IABService(Context c)
|
public IABService(Context c)
|
||||||
{
|
{
|
||||||
@ -72,6 +80,7 @@ public class IABService implements PurchasesUpdatedListener
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
startServiceConnection(this::queryPurchases, false);
|
startServiceConnection(this::queryPurchases, false);
|
||||||
|
startServiceConnection(this::querySkuDetails, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reloadPrefs()
|
public void reloadPrefs()
|
||||||
@ -126,9 +135,9 @@ public class IABService implements PurchasesUpdatedListener
|
|||||||
Purchase.PurchasesResult purchasesResult = client.queryPurchases(BillingClient.SkuType.INAPP);
|
Purchase.PurchasesResult purchasesResult = client.queryPurchases(BillingClient.SkuType.INAPP);
|
||||||
Log.i(TAG, "Querying purchases elapsed time: " + (System.currentTimeMillis() - time) + "ms");
|
Log.i(TAG, "Querying purchases elapsed time: " + (System.currentTimeMillis() - time) + "ms");
|
||||||
|
|
||||||
if (purchasesResult.getResponseCode() == BillingClient.BillingResponse.OK)
|
if (purchasesResult.getResponseCode() == BillingClient.BillingResponseCode.OK)
|
||||||
{
|
{
|
||||||
for (Purchase p : purchasesResult.getPurchasesList())
|
for (Purchase p : Objects.requireNonNull(purchasesResult.getPurchasesList()))
|
||||||
{
|
{
|
||||||
handlePurchase(p, false);
|
handlePurchase(p, false);
|
||||||
}
|
}
|
||||||
@ -150,17 +159,35 @@ public class IABService implements PurchasesUpdatedListener
|
|||||||
executeServiceRequest(queryToExecute, false);
|
executeServiceRequest(queryToExecute, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void querySkuDetails() {
|
||||||
|
}
|
||||||
|
|
||||||
public void purchase(Activity a, String id)
|
public void purchase(Activity a, String id)
|
||||||
{
|
{
|
||||||
|
Func0to0 queryRequest = () -> {
|
||||||
|
// Query the purchase async
|
||||||
|
SkuDetailsParams.Builder params = SkuDetailsParams.newBuilder();
|
||||||
|
params.setSkusList(Collections.singletonList(id)).setType(BillingClient.SkuType.INAPP);
|
||||||
|
client.querySkuDetailsAsync(params.build(), (billingResult, skuDetailsList) ->
|
||||||
|
{
|
||||||
|
if (billingResult.getResponseCode() != BillingClient.BillingResponseCode.OK || skuDetailsList == null || skuDetailsList.size() != 1)
|
||||||
|
{
|
||||||
|
SCNApp.showToast("Could not find product", Toast.LENGTH_SHORT);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
executeServiceRequest(() ->
|
executeServiceRequest(() ->
|
||||||
{
|
{
|
||||||
BillingFlowParams flowParams = BillingFlowParams
|
BillingFlowParams flowParams = BillingFlowParams
|
||||||
.newBuilder()
|
.newBuilder()
|
||||||
.setSku(id)
|
.setSkuDetails(skuDetailsList.get(0))
|
||||||
.setType(BillingClient.SkuType.INAPP) // SkuType.SUB for subscription
|
|
||||||
.build();
|
.build();
|
||||||
client.launchBillingFlow(a, flowParams);
|
client.launchBillingFlow(a, flowParams);
|
||||||
}, true);
|
}, true);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
executeServiceRequest(queryRequest, false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void executeServiceRequest(Func0to0 runnable, final boolean userRequest)
|
private void executeServiceRequest(Func0to0 runnable, final boolean userRequest)
|
||||||
@ -186,16 +213,16 @@ public class IABService implements PurchasesUpdatedListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPurchasesUpdated(int responseCode, @Nullable List<Purchase> purchases)
|
public void onPurchasesUpdated(@NonNull BillingResult billingResult, @Nullable List<Purchase> purchases)
|
||||||
{
|
{
|
||||||
if (responseCode == BillingClient.BillingResponse.OK && purchases != null)
|
if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK && purchases != null)
|
||||||
{
|
{
|
||||||
for (Purchase purchase : purchases)
|
for (Purchase purchase : purchases)
|
||||||
{
|
{
|
||||||
handlePurchase(purchase, true);
|
handlePurchase(purchase, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (responseCode == BillingClient.BillingResponse.ITEM_ALREADY_OWNED && purchases != null)
|
else if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.ITEM_ALREADY_OWNED && purchases != null)
|
||||||
{
|
{
|
||||||
for (Purchase purchase : purchases)
|
for (Purchase purchase : purchases)
|
||||||
{
|
{
|
||||||
@ -228,9 +255,9 @@ public class IABService implements PurchasesUpdatedListener
|
|||||||
client.startConnection(new BillingClientStateListener()
|
client.startConnection(new BillingClientStateListener()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void onBillingSetupFinished(@BillingClient.BillingResponse int billingResponseCode)
|
public void onBillingSetupFinished(@NonNull BillingResult billingResult)
|
||||||
{
|
{
|
||||||
if (billingResponseCode == BillingClient.BillingResponse.OK)
|
if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK)
|
||||||
{
|
{
|
||||||
isServiceConnected = true;
|
isServiceConnected = true;
|
||||||
if (executeOnSuccess != null) executeOnSuccess.invoke();
|
if (executeOnSuccess != null) executeOnSuccess.invoke();
|
||||||
|
@ -79,7 +79,7 @@ public class MainActivity extends AppCompatActivity
|
|||||||
|
|
||||||
SCNApp.register(this);
|
SCNApp.register(this);
|
||||||
IABService.startup(this);
|
IABService.startup(this);
|
||||||
SCNSettings.inst().work(this);
|
SCNSettings.inst().work(this, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -207,7 +207,7 @@ public class MainActivity extends AppCompatActivity
|
|||||||
tabLayout.setupWithViewPager(viewPager);
|
tabLayout.setupWithViewPager(viewPager);
|
||||||
|
|
||||||
|
|
||||||
SCNSettings.inst().work(this);
|
SCNSettings.inst().work(this, true);
|
||||||
|
|
||||||
SCNApp.showToast("Backup imported", Toast.LENGTH_LONG);
|
SCNApp.showToast("Backup imported", Toast.LENGTH_LONG);
|
||||||
|
|
||||||
|
@ -3,17 +3,12 @@ package com.blackforestbytes.simplecloudnotifier.view;
|
|||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.media.AudioAttributes;
|
import android.media.AudioAttributes;
|
||||||
import android.media.AudioManager;
|
import android.media.AudioManager;
|
||||||
import android.media.MediaPlayer;
|
import android.media.MediaPlayer;
|
||||||
import android.media.Ringtone;
|
|
||||||
import android.media.RingtoneManager;
|
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Environment;
|
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@ -30,11 +25,12 @@ import android.widget.Switch;
|
|||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.android.billingclient.api.Purchase;
|
import androidx.annotation.NonNull;
|
||||||
import com.blackforestbytes.simplecloudnotifier.BuildConfig;
|
import androidx.core.content.FileProvider;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
import com.blackforestbytes.simplecloudnotifier.R;
|
import com.blackforestbytes.simplecloudnotifier.R;
|
||||||
import com.blackforestbytes.simplecloudnotifier.SCNApp;
|
import com.blackforestbytes.simplecloudnotifier.SCNApp;
|
||||||
import com.blackforestbytes.simplecloudnotifier.lib.android.ThreadUtils;
|
|
||||||
import com.blackforestbytes.simplecloudnotifier.lib.lambda.FI;
|
import com.blackforestbytes.simplecloudnotifier.lib.lambda.FI;
|
||||||
import com.blackforestbytes.simplecloudnotifier.lib.string.Str;
|
import com.blackforestbytes.simplecloudnotifier.lib.string.Str;
|
||||||
import com.blackforestbytes.simplecloudnotifier.model.SCNSettings;
|
import com.blackforestbytes.simplecloudnotifier.model.SCNSettings;
|
||||||
@ -47,12 +43,8 @@ import java.io.File;
|
|||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.ObjectOutputStream;
|
import java.io.ObjectOutputStream;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.core.content.FileProvider;
|
|
||||||
import androidx.fragment.app.Fragment;
|
|
||||||
import top.defaults.colorpicker.ColorPickerPopup;
|
import top.defaults.colorpicker.ColorPickerPopup;
|
||||||
import xyz.aprildown.ultimatemusicpicker.MusicPickerListener;
|
import xyz.aprildown.ultimatemusicpicker.MusicPickerListener;
|
||||||
import xyz.aprildown.ultimatemusicpicker.UltimateMusicPicker;
|
import xyz.aprildown.ultimatemusicpicker.UltimateMusicPicker;
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#Sun Jan 05 22:18:36 UTC 2020
|
#Thu Mar 05 15:29:10 UTC 2020
|
||||||
VERSION_NAME=1.7.0
|
VERSION_NAME=1.8.0
|
||||||
VERSION_CODE=22
|
VERSION_CODE=23
|
||||||
|
@ -7,8 +7,8 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.2.1'
|
classpath 'com.android.tools.build:gradle:8.9.1'
|
||||||
classpath 'com.google.gms:google-services:4.2.0'
|
classpath 'com.google.gms:google-services:4.3.10'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,3 +14,6 @@ org.gradle.jvmargs=-Xmx1536m
|
|||||||
|
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
|
android.defaults.buildfeatures.buildconfig=true
|
||||||
|
android.nonTransitiveRClass=false
|
||||||
|
android.nonFinalResIds=false
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#Wed Sep 26 22:10:14 CEST 2018
|
#Tue Nov 03 14:10:19 CET 2020
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
|
||||||
|
58
androidExportReader/.gitignore
vendored
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
# Created by https://www.toptal.com/developers/gitignore/api/java,gradle
|
||||||
|
# Edit at https://www.toptal.com/developers/gitignore?templates=java,gradle
|
||||||
|
|
||||||
|
### Java ###
|
||||||
|
# Compiled class file
|
||||||
|
*.class
|
||||||
|
|
||||||
|
# Log file
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# BlueJ files
|
||||||
|
*.ctxt
|
||||||
|
|
||||||
|
# Mobile Tools for Java (J2ME)
|
||||||
|
.mtj.tmp/
|
||||||
|
|
||||||
|
# Package Files #
|
||||||
|
*.jar
|
||||||
|
*.war
|
||||||
|
*.nar
|
||||||
|
*.ear
|
||||||
|
*.zip
|
||||||
|
*.tar.gz
|
||||||
|
*.rar
|
||||||
|
|
||||||
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
|
hs_err_pid*
|
||||||
|
replay_pid*
|
||||||
|
|
||||||
|
### Gradle ###
|
||||||
|
.gradle
|
||||||
|
**/build/
|
||||||
|
!src/**/build/
|
||||||
|
|
||||||
|
# Ignore Gradle GUI config
|
||||||
|
gradle-app.setting
|
||||||
|
|
||||||
|
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||||
|
!gradle-wrapper.jar
|
||||||
|
|
||||||
|
# Avoid ignore Gradle wrappper properties
|
||||||
|
!gradle-wrapper.properties
|
||||||
|
|
||||||
|
# Cache of project
|
||||||
|
.gradletasknamecache
|
||||||
|
|
||||||
|
# Eclipse Gradle plugin generated files
|
||||||
|
# Eclipse Core
|
||||||
|
.project
|
||||||
|
# JDT-specific (Eclipse Java Development Tools)
|
||||||
|
.classpath
|
||||||
|
|
||||||
|
### Gradle Patch ###
|
||||||
|
# Java heap dump
|
||||||
|
*.hprof
|
||||||
|
|
||||||
|
# End of https://www.toptal.com/developers/gitignore/api/java,gradle
|
||||||
|
|
8
androidExportReader/.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
6
androidExportReader/.idea/compiler.xml
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CompilerConfiguration">
|
||||||
|
<bytecodeTargetLevel target="18" />
|
||||||
|
</component>
|
||||||
|
</project>
|
17
androidExportReader/.idea/gradle.xml
generated
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||||
|
<component name="GradleSettings">
|
||||||
|
<option name="linkedExternalProjectsSettings">
|
||||||
|
<GradleProjectSettings>
|
||||||
|
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="modules">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</GradleProjectSettings>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
11
androidExportReader/.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="JavadocReference" enabled="true" level="WARNING" enabled_by_default="true" editorAttributes="WARNING_ATTRIBUTES" />
|
||||||
|
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
||||||
|
<option name="processCode" value="true" />
|
||||||
|
<option name="processLiterals" value="true" />
|
||||||
|
<option name="processComments" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
</profile>
|
||||||
|
</component>
|
25
androidExportReader/.idea/jarRepositories.xml
generated
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RemoteRepositoriesConfiguration">
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Maven Central repository" />
|
||||||
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="jboss.community" />
|
||||||
|
<option name="name" value="JBoss Community repository" />
|
||||||
|
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="MavenRepo" />
|
||||||
|
<option name="name" value="MavenRepo" />
|
||||||
|
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="maven" />
|
||||||
|
<option name="name" value="maven" />
|
||||||
|
<option name="url" value="https://jitpack.io" />
|
||||||
|
</remote-repository>
|
||||||
|
</component>
|
||||||
|
</project>
|
10
androidExportReader/.idea/misc.xml
generated
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
|
<component name="FrameworkDetectionExcludesConfiguration">
|
||||||
|
<file type="web" url="file://$PROJECT_DIR$" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_18" default="true" project-jdk-name="openjdk-18" project-jdk-type="JavaSDK">
|
||||||
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
|
</component>
|
||||||
|
</project>
|
6
androidExportReader/.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
47
androidExportReader/build.gradle
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'gradle.plugin.com.github.johnrengelman:shadow:7.1.2'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id 'java'
|
||||||
|
id("com.github.johnrengelman.shadow") version "7.1.2"
|
||||||
|
id 'application'
|
||||||
|
}
|
||||||
|
|
||||||
|
group 'com.blackforestbytes'
|
||||||
|
version '1.0-SNAPSHOT'
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
maven { url "https://jitpack.io" }
|
||||||
|
}
|
||||||
|
|
||||||
|
application {
|
||||||
|
mainClass = 'com.blackforestbytes.Main'
|
||||||
|
}
|
||||||
|
|
||||||
|
jar {
|
||||||
|
manifest {
|
||||||
|
attributes 'Main-Class': application.mainClass
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.jar {
|
||||||
|
manifest.attributes["Main-Class"] = application.mainClass
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation 'com.github.RalleYTN:SimpleJSON:2.1.1'
|
||||||
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
|
||||||
|
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
|
||||||
|
}
|
||||||
|
|
||||||
|
test {
|
||||||
|
useJUnitPlatform()
|
||||||
|
}
|
BIN
androidExportReader/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
5
androidExportReader/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionPath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
zipStorePath=wrapper/dists
|
240
androidExportReader/gradlew
vendored
Executable file
@ -0,0 +1,240 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright © 2015-2021 the original authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Gradle start up script for POSIX generated by Gradle.
|
||||||
|
#
|
||||||
|
# Important for running:
|
||||||
|
#
|
||||||
|
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||||
|
# noncompliant, but you have some other compliant shell such as ksh or
|
||||||
|
# bash, then to run this script, type that shell name before the whole
|
||||||
|
# command line, like:
|
||||||
|
#
|
||||||
|
# ksh Gradle
|
||||||
|
#
|
||||||
|
# Busybox and similar reduced shells will NOT work, because this script
|
||||||
|
# requires all of these POSIX shell features:
|
||||||
|
# * functions;
|
||||||
|
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||||
|
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||||
|
# * compound commands having a testable exit status, especially «case»;
|
||||||
|
# * various built-in commands including «command», «set», and «ulimit».
|
||||||
|
#
|
||||||
|
# Important for patching:
|
||||||
|
#
|
||||||
|
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||||
|
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||||
|
#
|
||||||
|
# The "traditional" practice of packing multiple parameters into a
|
||||||
|
# space-separated string is a well documented source of bugs and security
|
||||||
|
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||||
|
# options in "$@", and eventually passing that to Java.
|
||||||
|
#
|
||||||
|
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||||
|
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||||
|
# see the in-line comments for details.
|
||||||
|
#
|
||||||
|
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||||
|
# Darwin, MinGW, and NonStop.
|
||||||
|
#
|
||||||
|
# (3) This script is generated from the Groovy template
|
||||||
|
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
|
# within the Gradle project.
|
||||||
|
#
|
||||||
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# Attempt to set APP_HOME
|
||||||
|
|
||||||
|
# Resolve links: $0 may be a link
|
||||||
|
app_path=$0
|
||||||
|
|
||||||
|
# Need this for daisy-chained symlinks.
|
||||||
|
while
|
||||||
|
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||||
|
[ -h "$app_path" ]
|
||||||
|
do
|
||||||
|
ls=$( ls -ld "$app_path" )
|
||||||
|
link=${ls#*' -> '}
|
||||||
|
case $link in #(
|
||||||
|
/*) app_path=$link ;; #(
|
||||||
|
*) app_path=$APP_HOME$link ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||||
|
|
||||||
|
APP_NAME="Gradle"
|
||||||
|
APP_BASE_NAME=${0##*/}
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
|
MAX_FD=maximum
|
||||||
|
|
||||||
|
warn () {
|
||||||
|
echo "$*"
|
||||||
|
} >&2
|
||||||
|
|
||||||
|
die () {
|
||||||
|
echo
|
||||||
|
echo "$*"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
} >&2
|
||||||
|
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false
|
||||||
|
msys=false
|
||||||
|
darwin=false
|
||||||
|
nonstop=false
|
||||||
|
case "$( uname )" in #(
|
||||||
|
CYGWIN* ) cygwin=true ;; #(
|
||||||
|
Darwin* ) darwin=true ;; #(
|
||||||
|
MSYS* | MINGW* ) msys=true ;; #(
|
||||||
|
NONSTOP* ) nonstop=true ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
|
# Determine the Java command to use to start the JVM.
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||||
|
else
|
||||||
|
JAVACMD=$JAVA_HOME/bin/java
|
||||||
|
fi
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD=java
|
||||||
|
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Increase the maximum file descriptors if we can.
|
||||||
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
|
case $MAX_FD in #(
|
||||||
|
max*)
|
||||||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
|
warn "Could not query maximum file descriptor limit"
|
||||||
|
esac
|
||||||
|
case $MAX_FD in #(
|
||||||
|
'' | soft) :;; #(
|
||||||
|
*)
|
||||||
|
ulimit -n "$MAX_FD" ||
|
||||||
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Collect all arguments for the java command, stacking in reverse order:
|
||||||
|
# * args from the command line
|
||||||
|
# * the main class name
|
||||||
|
# * -classpath
|
||||||
|
# * -D...appname settings
|
||||||
|
# * --module-path (only if needed)
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||||
|
|
||||||
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
|
if "$cygwin" || "$msys" ; then
|
||||||
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
|
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||||
|
|
||||||
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
|
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
for arg do
|
||||||
|
if
|
||||||
|
case $arg in #(
|
||||||
|
-*) false ;; # don't mess with options #(
|
||||||
|
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||||
|
[ -e "$t" ] ;; #(
|
||||||
|
*) false ;;
|
||||||
|
esac
|
||||||
|
then
|
||||||
|
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||||
|
fi
|
||||||
|
# Roll the args list around exactly as many times as the number of
|
||||||
|
# args, so each arg winds up back in the position where it started, but
|
||||||
|
# possibly modified.
|
||||||
|
#
|
||||||
|
# NB: a `for` loop captures its iteration list before it begins, so
|
||||||
|
# changing the positional parameters here affects neither the number of
|
||||||
|
# iterations, nor the values presented in `arg`.
|
||||||
|
shift # remove old arg
|
||||||
|
set -- "$@" "$arg" # push replacement arg
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Collect all arguments for the java command;
|
||||||
|
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||||
|
# shell script including quotes and variable substitutions, so put them in
|
||||||
|
# double quotes to make sure that they get re-expanded; and
|
||||||
|
# * put everything else in single quotes, so that it's not re-expanded.
|
||||||
|
|
||||||
|
set -- \
|
||||||
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
|
-classpath "$CLASSPATH" \
|
||||||
|
org.gradle.wrapper.GradleWrapperMain \
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
# Stop when "xargs" is not available.
|
||||||
|
if ! command -v xargs >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "xargs is not available"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Use "xargs" to parse quoted args.
|
||||||
|
#
|
||||||
|
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||||
|
#
|
||||||
|
# In Bash we could simply go:
|
||||||
|
#
|
||||||
|
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||||
|
# set -- "${ARGS[@]}" "$@"
|
||||||
|
#
|
||||||
|
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||||
|
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||||
|
# character that might be a shell metacharacter, then use eval to reverse
|
||||||
|
# that process (while maintaining the separation between arguments), and wrap
|
||||||
|
# the whole thing up as a single "set" statement.
|
||||||
|
#
|
||||||
|
# This will of course break if any of these variables contains a newline or
|
||||||
|
# an unmatched quote.
|
||||||
|
#
|
||||||
|
|
||||||
|
eval "set -- $(
|
||||||
|
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||||
|
xargs -n1 |
|
||||||
|
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||||
|
tr '\n' ' '
|
||||||
|
)" '"$@"'
|
||||||
|
|
||||||
|
exec "$JAVACMD" "$@"
|
91
androidExportReader/gradlew.bat
vendored
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
@rem
|
||||||
|
@rem Copyright 2015 the original author or authors.
|
||||||
|
@rem
|
||||||
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@rem you may not use this file except in compliance with the License.
|
||||||
|
@rem You may obtain a copy of the License at
|
||||||
|
@rem
|
||||||
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@rem
|
||||||
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@rem See the License for the specific language governing permissions and
|
||||||
|
@rem limitations under the License.
|
||||||
|
@rem
|
||||||
|
|
||||||
|
@if "%DEBUG%"=="" @echo off
|
||||||
|
@rem ##########################################################################
|
||||||
|
@rem
|
||||||
|
@rem Gradle startup script for Windows
|
||||||
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
|
|
||||||
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
set DIRNAME=%~dp0
|
||||||
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
|
set APP_BASE_NAME=%~n0
|
||||||
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
|
@rem Find java.exe
|
||||||
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
|
set JAVA_EXE=java.exe
|
||||||
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:findJavaFromJavaHome
|
||||||
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
|
:end
|
||||||
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||||
|
|
||||||
|
:fail
|
||||||
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
|
rem the _cmd.exe /c_ return code!
|
||||||
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
|
exit /b %EXIT_CODE%
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
2
androidExportReader/settings.gradle
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
rootProject.name = 'androidExportReader'
|
||||||
|
|
104
androidExportReader/src/main/java/com/blackforestbytes/Main.java
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
package com.blackforestbytes;
|
||||||
|
|
||||||
|
import de.ralleytn.simple.json.JSONArray;
|
||||||
|
import de.ralleytn.simple.json.JSONFormatter;
|
||||||
|
import de.ralleytn.simple.json.JSONObject;
|
||||||
|
|
||||||
|
import java.io.ObjectInputStream;
|
||||||
|
import java.net.URI;
|
||||||
|
import java.nio.file.FileSystems;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
public class Main {
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public static void main(String[] args) {
|
||||||
|
if (args.length != 1) {
|
||||||
|
System.err.println("call with ./androidExportConvert scn_export.dat");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
var path = FileSystems.getDefault().getPath(args[0]).normalize().toAbsolutePath().toUri().toURL();
|
||||||
|
|
||||||
|
ObjectInputStream stream = new ObjectInputStream(path.openStream());
|
||||||
|
|
||||||
|
Map<String, ?> d1 = new HashMap<>((Map<String, ?>)stream.readObject());
|
||||||
|
Map<String, ?> d2 = new HashMap<>((Map<String, ?>)stream.readObject());
|
||||||
|
Map<String, ?> d3 = new HashMap<>((Map<String, ?>)stream.readObject());
|
||||||
|
Map<String, ?> d4 = new HashMap<>((Map<String, ?>)stream.readObject());
|
||||||
|
|
||||||
|
stream.close();
|
||||||
|
|
||||||
|
JSONObject root = new JSONObject();
|
||||||
|
|
||||||
|
var subConfig = new JSONObject();
|
||||||
|
var subIAB = new JSONArray();
|
||||||
|
var subCMessageList = new JSONArray();
|
||||||
|
var subAcks = new JSONArray();
|
||||||
|
var subQueryLog = new JSONArray();
|
||||||
|
|
||||||
|
for (Map.Entry<String, ?> entry : d1.entrySet())
|
||||||
|
{
|
||||||
|
if (entry.getValue() instanceof String) subConfig.put(entry.getKey(), (String)entry.getValue());
|
||||||
|
if (entry.getValue() instanceof Boolean) subConfig.put(entry.getKey(), (Boolean)entry.getValue());
|
||||||
|
if (entry.getValue() instanceof Float) subConfig.put(entry.getKey(), (Float)entry.getValue());
|
||||||
|
if (entry.getValue() instanceof Integer) subConfig.put(entry.getKey(), (Integer)entry.getValue());
|
||||||
|
if (entry.getValue() instanceof Long) subConfig.put(entry.getKey(), (Long)entry.getValue());
|
||||||
|
if (entry.getValue() instanceof Set<?>) subConfig.put(entry.getKey(), ((Set<String>)entry.getValue()).toArray());
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < (Integer)d2.get("c"); i++) {
|
||||||
|
var obj = new JSONObject();
|
||||||
|
obj.put("key", d2.get("["+i+"]->key"));
|
||||||
|
obj.put("value", d2.get("["+i+"]->value"));
|
||||||
|
subIAB.add(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < (Integer)d3.get("message_count"); i++) {
|
||||||
|
if (d3.get("message["+i+"].scnid") == null)
|
||||||
|
throw new Exception("ONF");
|
||||||
|
|
||||||
|
var obj = new JSONObject();
|
||||||
|
obj.put("timestamp", d3.get("message["+i+"].timestamp"));
|
||||||
|
obj.put("title", d3.get("message["+i+"].title"));
|
||||||
|
obj.put("content", d3.get("message["+i+"].content"));
|
||||||
|
obj.put("priority", d3.get("message["+i+"].priority"));
|
||||||
|
obj.put("scnid", d3.get("message["+i+"].scnid"));
|
||||||
|
subCMessageList.add(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
subAcks.addAll(((Set<String>)d3.get("acks")).stream().map(p -> Long.decode("0x"+p)).toList());
|
||||||
|
|
||||||
|
for (int i = 0; i < (Integer)d4.get("history_count"); i++) {
|
||||||
|
if (d4.get("message["+(i+1000)+"].Name") == null)
|
||||||
|
throw new Exception("ONF");
|
||||||
|
|
||||||
|
var obj = new JSONObject();
|
||||||
|
obj.put("Level", d4.get("message["+(i+1000)+"].Level"));
|
||||||
|
obj.put("Timestamp", d4.get("message["+(i+1000)+"].Timestamp"));
|
||||||
|
obj.put("Name", d4.get("message["+(i+1000)+"].Name"));
|
||||||
|
obj.put("URL", d4.get("message["+(i+1000)+"].URL"));
|
||||||
|
obj.put("Response", d4.get("message["+(i+1000)+"].Response"));
|
||||||
|
obj.put("ResponseCode", d4.get("message["+(i+1000)+"].ResponseCode"));
|
||||||
|
obj.put("ExceptionString", d4.get("message["+(i+1000)+"].ExceptionString"));
|
||||||
|
subQueryLog.add(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
root.put("config", subConfig);
|
||||||
|
root.put("iab", subIAB);
|
||||||
|
root.put("cmessagelist", subCMessageList);
|
||||||
|
root.put("acks", subAcks);
|
||||||
|
root.put("querylog", subQueryLog);
|
||||||
|
|
||||||
|
System.out.println(new JSONFormatter().format(root.toString()));
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
BIN
data/appicon_2.0.xcf
Normal file
BIN
data/function_graphic.ora
Executable file
BIN
data/icon.ora
Executable file
BIN
data/icon_web.ora
Executable file
BIN
data/phone.ora
Executable file
60
flutter/.gitignore
vendored
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
|
||||||
|
|
||||||
|
*.keystore
|
||||||
|
|
||||||
|
firepit-log.txt
|
||||||
|
flutter_jank_*
|
||||||
|
|
||||||
|
_releases/*
|
||||||
|
|
||||||
|
|
||||||
|
#######################################################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Miscellaneous
|
||||||
|
*.class
|
||||||
|
*.log
|
||||||
|
*.pyc
|
||||||
|
*.swp
|
||||||
|
.DS_Store
|
||||||
|
.atom/
|
||||||
|
.buildlog/
|
||||||
|
.history
|
||||||
|
.svn/
|
||||||
|
migrate_working_dir/
|
||||||
|
|
||||||
|
# IntelliJ related
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
*.iws
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# The .vscode folder contains launch configuration and tasks you configure in
|
||||||
|
# VS Code which you may wish to be included in version control, so this line
|
||||||
|
# is commented out by default.
|
||||||
|
#.vscode/
|
||||||
|
|
||||||
|
# Flutter/Dart/Pub related
|
||||||
|
**/doc/api/
|
||||||
|
**/ios/Flutter/.last_build_id
|
||||||
|
.dart_tool/
|
||||||
|
.flutter-plugins
|
||||||
|
.flutter-plugins-dependencies
|
||||||
|
.pub-cache/
|
||||||
|
.pub/
|
||||||
|
/build/
|
||||||
|
|
||||||
|
# Symbolication related
|
||||||
|
app.*.symbols
|
||||||
|
|
||||||
|
# Obfuscation related
|
||||||
|
app.*.map.json
|
||||||
|
|
||||||
|
# Android Studio will place build artifacts here
|
||||||
|
/android/app/debug
|
||||||
|
/android/app/profile
|
||||||
|
/android/app/release
|
||||||
|
|
||||||
|
/lib/git_stamp/
|
45
flutter/.metadata
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# This file tracks properties of this Flutter project.
|
||||||
|
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||||
|
#
|
||||||
|
# This file should be version controlled and should not be manually edited.
|
||||||
|
|
||||||
|
version:
|
||||||
|
revision: "41456452f29d64e8deb623a3c927524bcf9f111b"
|
||||||
|
channel: "stable"
|
||||||
|
|
||||||
|
project_type: app
|
||||||
|
|
||||||
|
# Tracks metadata for the flutter migrate command
|
||||||
|
migration:
|
||||||
|
platforms:
|
||||||
|
- platform: root
|
||||||
|
create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b
|
||||||
|
base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b
|
||||||
|
- platform: android
|
||||||
|
create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b
|
||||||
|
base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b
|
||||||
|
- platform: ios
|
||||||
|
create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b
|
||||||
|
base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b
|
||||||
|
- platform: linux
|
||||||
|
create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b
|
||||||
|
base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b
|
||||||
|
- platform: macos
|
||||||
|
create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b
|
||||||
|
base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b
|
||||||
|
- platform: web
|
||||||
|
create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b
|
||||||
|
base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b
|
||||||
|
- platform: windows
|
||||||
|
create_revision: 41456452f29d64e8deb623a3c927524bcf9f111b
|
||||||
|
base_revision: 41456452f29d64e8deb623a3c927524bcf9f111b
|
||||||
|
|
||||||
|
# User provided section
|
||||||
|
|
||||||
|
# List of Local paths (relative to this file) that should be
|
||||||
|
# ignored by the migrate tool.
|
||||||
|
#
|
||||||
|
# Files that are not part of the templates will be ignored by default.
|
||||||
|
unmanaged_files:
|
||||||
|
- 'lib/main.dart'
|
||||||
|
- 'ios/Runner.xcodeproj/project.pbxproj'
|
25
flutter/.vscode/launch.json
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "flutter",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "dart"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "flutter (profile mode)",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "dart",
|
||||||
|
"flutterMode": "profile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "flutter (release mode)",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "dart",
|
||||||
|
"flutterMode": "release"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
71
flutter/Makefile
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# Setup
|
||||||
|
#
|
||||||
|
# flutter config --jdk-dir "/usr/lib/jvm/default-runtime/bin"
|
||||||
|
# sudo archlinux-java set java-17-openjdk
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# runs app locally (linux)
|
||||||
|
run-linux: gen
|
||||||
|
dart run build_runner build
|
||||||
|
_JAVA_OPTIONS="" flutter run -d linux
|
||||||
|
|
||||||
|
# runs app locally (web | not really supported)
|
||||||
|
run-web: gen
|
||||||
|
dart run build_runner build
|
||||||
|
_JAVA_OPTIONS="" flutter run -d chrome
|
||||||
|
|
||||||
|
# runs on android device (must have network adb enabled teh correct IP)
|
||||||
|
run-android: gen
|
||||||
|
ping -c1 10.10.10.177
|
||||||
|
adb connect 10.10.10.177:5555
|
||||||
|
flutter pub run build_runner build
|
||||||
|
_JAVA_OPTIONS="" flutter run -d 10.10.10.177:5555
|
||||||
|
|
||||||
|
install-release: gen
|
||||||
|
# Install on Pixel 7a
|
||||||
|
flutter build apk --release
|
||||||
|
flutter run --release -d 35221JEHN07157
|
||||||
|
|
||||||
|
build-release: gen
|
||||||
|
flutter build apk --release
|
||||||
|
flutter build appbundle --release
|
||||||
|
flutter build linux --release
|
||||||
|
|
||||||
|
test:
|
||||||
|
dart analyze
|
||||||
|
|
||||||
|
fix:
|
||||||
|
dart fix --apply
|
||||||
|
|
||||||
|
gen:
|
||||||
|
./_utils/inc_buildnum.sh
|
||||||
|
dart run build_runner build
|
||||||
|
dart run git_stamp git_stamp --build-type lite --limit 2
|
||||||
|
|
||||||
|
# run `make run` in another terminal (or another variant of flutter run)
|
||||||
|
autoreload:
|
||||||
|
@
|
||||||
|
@_utils/autoreload.sh
|
||||||
|
|
||||||
|
icons:
|
||||||
|
flutter pub run flutter_launcher_icons -f "flutter_launcher_icons.yaml"
|
||||||
|
|
||||||
|
clean:
|
||||||
|
cd android && ./gradlew clean
|
||||||
|
flutter clean
|
||||||
|
|
||||||
|
# upgrade all packages (add --major-versions even updates across new major versions)
|
||||||
|
# https://docs.flutter.dev/release/upgrade
|
||||||
|
# upgrading flutter can be done via `flutter upgrade`: https://docs.flutter.dev/release/upgrade
|
||||||
|
# android/gradle updates should be done via androidStudio: https://docs.flutter.dev/release/breaking-changes/android-java-gradle-migration-guide
|
||||||
|
upgrade:
|
||||||
|
flutter upgrade
|
||||||
|
flutter pub upgrade
|
||||||
|
flutter doctor
|
||||||
|
|
||||||
|
aider:
|
||||||
|
aider --model gemini-2.5-pro --no-auto-commits --no-dirty-commits --test-cmd "flutter build linux" --auto-test --subtree-only
|
17
flutter/README.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
### Links
|
||||||
|
|
||||||
|
|
||||||
|
- https://pub.dev/packages/font_awesome_flutter
|
||||||
|
- https://fontawesome.com/search
|
||||||
|
|
||||||
|
- https://docs.flutter.dev/ui/widgets
|
||||||
|
- https://docs.flutter.dev/ui/widgets/material
|
||||||
|
|
||||||
|
- https://docs.flutter.dev/cookbook/persistence/sqlite
|
||||||
|
- https://pub.dev/packages/sqflite
|
||||||
|
- https://pub.dev/packages/sqflite_common_ffi
|
||||||
|
|
||||||
|
- https://pub.dev/packages/hive
|
||||||
|
|
||||||
|
|
||||||
|
|
63
flutter/TODO.md
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
|
||||||
|
# TODO
|
||||||
|
|
||||||
|
- [x] Message List
|
||||||
|
* [x] CRUD
|
||||||
|
- [x] Message Big-View
|
||||||
|
- [x] Search/Filter Messages
|
||||||
|
- [x] Channel List
|
||||||
|
* [x] Show subs
|
||||||
|
* [x] CRUD
|
||||||
|
* [x] what about unsubbed foreign channels? - thex should still be visible (or should they, do i still get the messages?)
|
||||||
|
- [x] Sub List
|
||||||
|
* [x] Sub/Unsub/Accept/Deny
|
||||||
|
- [x] Debug List (Show logs, requests)
|
||||||
|
- [x] Key List
|
||||||
|
* [x] CRUD
|
||||||
|
- [x] Auto R-only key for admin, use for QR+link+send
|
||||||
|
- [ ] settings
|
||||||
|
- [?] notifications
|
||||||
|
- [?] push navigation stack
|
||||||
|
- [/] read + migrate old SharedPrefs (or not? - who uses SCN even??)
|
||||||
|
- [x] Account-Page
|
||||||
|
- [x] Logout
|
||||||
|
- [x] Send-page
|
||||||
|
|
||||||
|
- [ ] Still @ERROR on scn-init, but no logs? - better persist error (write in SharedPrefs at error_$date=txt ?), also perhaps print first error line in scn-init notification?
|
||||||
|
|
||||||
|
- [x] fix time format (in message-list, in card, top right) - midnight is shown as "24:05" instead of "00:05" - thats weird
|
||||||
|
|
||||||
|
- [x] Add scrollbar
|
||||||
|
-> https://api.flutter.dev/flutter/material/Scrollbar-class.html
|
||||||
|
|
||||||
|
- [x] you cant unsubscribe from foreign channel without completely loosing subscription.
|
||||||
|
perhaps subscriptions should have two cofirmed bool (both must be true to receive messages): confirmed-owner && confirmed-subscriber
|
||||||
|
Then the subscriber can unconfirm his half - without loosing the owner confirmation
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
# TODO iOS specific
|
||||||
|
|
||||||
|
- [ ] payment / pro
|
||||||
|
- [ ] show notifiactions (foreground/background/etc)
|
||||||
|
- [ ] handle click-on-notifications should open message
|
||||||
|
- [ ] share message
|
||||||
|
- [ ] scan QR
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
# TODO Server
|
||||||
|
|
||||||
|
- [ ] Switch server to sq style from faby
|
||||||
|
- [ ] switch from mattn to go-sqlite
|
||||||
|
- [ ] Single struct for model/db/json
|
||||||
|
- [ ] use ginext
|
||||||
|
- [ ] use sq.Query | sq.Update | sq.InsertAndQuery | ....
|
||||||
|
- [ ] sq.DBOptions - enable CommentTrimmer and DefaultConverter
|
||||||
|
- [ ] run unit-tests...
|
||||||
|
- [ ] Copy db.Migrate code
|
||||||
|
|
||||||
|
- [ ] Disable compat | remove code
|
||||||
|
- [x] compat message title
|
||||||
|
- [ ] ...
|
||||||
|
- [ ] RWLock directly in go - prevent/reduce db-locked exception
|
57
flutter/_utils/autoreload.sh
Executable file
@ -0,0 +1,57 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# shellcheck disable=SC2002 # disable useless-cat warning
|
||||||
|
|
||||||
|
set -o nounset # disallow usage of unset vars ( set -u )
|
||||||
|
#set -o errexit # Exit immediately if a pipeline returns non-zero. ( set -e )
|
||||||
|
#set -o errtrace # Allow the above trap be inherited by all functions in the script. ( set -E )
|
||||||
|
set -o pipefail # Return value of a pipeline is the value of the last (rightmost) command to exit with a non-zero status
|
||||||
|
IFS=$'\n\t' # Set $IFS to only newline and tab.
|
||||||
|
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
cr=$'\n'
|
||||||
|
|
||||||
|
function black() { if [ -t 1 ] && [ -n "$(tput colors)" ] && [ "$(tput colors)" -ge 8 ]; then echo -e "\\x1B[30m$1\\x1B[0m"; else echo "$1"; fi }
|
||||||
|
function red() { if [ -t 1 ] && [ -n "$(tput colors)" ] && [ "$(tput colors)" -ge 8 ]; then echo -e "\\x1B[31m$1\\x1B[0m"; else echo "$1"; fi; }
|
||||||
|
function green() { if [ -t 1 ] && [ -n "$(tput colors)" ] && [ "$(tput colors)" -ge 8 ]; then echo -e "\\x1B[32m$1\\x1B[0m"; else echo "$1"; fi; }
|
||||||
|
function yellow(){ if [ -t 1 ] && [ -n "$(tput colors)" ] && [ "$(tput colors)" -ge 8 ]; then echo -e "\\x1B[33m$1\\x1B[0m"; else echo "$1"; fi; }
|
||||||
|
function blue() { if [ -t 1 ] && [ -n "$(tput colors)" ] && [ "$(tput colors)" -ge 8 ]; then echo -e "\\x1B[34m$1\\x1B[0m"; else echo "$1"; fi; }
|
||||||
|
function purple(){ if [ -t 1 ] && [ -n "$(tput colors)" ] && [ "$(tput colors)" -ge 8 ]; then echo -e "\\x1B[35m$1\\x1B[0m"; else echo "$1"; fi; }
|
||||||
|
function cyan() { if [ -t 1 ] && [ -n "$(tput colors)" ] && [ "$(tput colors)" -ge 8 ]; then echo -e "\\x1B[36m$1\\x1B[0m"; else echo "$1"; fi; }
|
||||||
|
function white() { if [ -t 1 ] && [ -n "$(tput colors)" ] && [ "$(tput colors)" -ge 8 ]; then echo -e "\\x1B[37m$1\\x1B[0m"; else echo "$1"; fi; }
|
||||||
|
|
||||||
|
# cd "$(dirname "$0")" || exit 1 # (optionally) cd to directory where script is located
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
pids="$( pgrep -f 'flutter_tools\.[s]napshot run' || echo '' )"
|
||||||
|
|
||||||
|
if [ -z "$pids" ]; then
|
||||||
|
red "No [flutter run] process found - exiting"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
trap 'echo "reseived SIGNAL<EXIT> - exiting"; jobs -p | xargs kill ; exit 0' EXIT
|
||||||
|
trap 'echo "reseived SIGNAL<SIGINT> - exiting"; jobs -p | xargs kill ; exit 0' SIGINT
|
||||||
|
trap 'echo "reseived SIGNAL<SIGTERM> - exiting"; jobs -p | xargs kill ; exit 0' SIGTERM
|
||||||
|
trap 'echo "reseived SIGNAL<SIGQUIT> - exiting"; jobs -p | xargs kill ; exit 0' SIGQUIT
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
while IFS= read -r pid; do
|
||||||
|
blue "Listening for changes in lib/ directory - sending signals to ${pid}..."
|
||||||
|
done <<< "$pids"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
while IFS= read -r pid; do
|
||||||
|
{
|
||||||
|
while true; do
|
||||||
|
find lib/ -name '*.dart' | entr -d -p sh -c "echo 'File(s) changed - Sending SIGUSR to $pid' ; kill -USR1 $pid";
|
||||||
|
yellow 'File list changed - restart';
|
||||||
|
done
|
||||||
|
} &
|
||||||
|
done <<< "$pids"
|
||||||
|
|
||||||
|
wait # wait for all background jobs to finish
|
||||||
|
|
||||||
|
echo "DONE."
|
41
flutter/_utils/inc_buildnum.sh
Executable file
@ -0,0 +1,41 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# shellcheck disable=SC2002 # disable useless-cat warning
|
||||||
|
|
||||||
|
set -o nounset # disallow usage of unset vars ( set -u )
|
||||||
|
set -o errexit # Exit immediately if a pipeline returns non-zero. ( set -e )
|
||||||
|
set -o errtrace # Allow the above trap be inherited by all functions in the script. ( set -E )
|
||||||
|
set -o pipefail # Return value of a pipeline is the value of the last (rightmost) command to exit with a non-zero status
|
||||||
|
IFS=$'\n\t' # Set $IFS to only newline and tab.
|
||||||
|
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
cr=$'\n'
|
||||||
|
|
||||||
|
function black() { if [ -t 1 ] && [ -n "$(tput colors)" ] && [ "$(tput colors)" -ge 8 ]; then echo -e "\\x1B[30m$1\\x1B[0m"; else echo "$1"; fi }
|
||||||
|
function red() { if [ -t 1 ] && [ -n "$(tput colors)" ] && [ "$(tput colors)" -ge 8 ]; then echo -e "\\x1B[31m$1\\x1B[0m"; else echo "$1"; fi; }
|
||||||
|
function green() { if [ -t 1 ] && [ -n "$(tput colors)" ] && [ "$(tput colors)" -ge 8 ]; then echo -e "\\x1B[32m$1\\x1B[0m"; else echo "$1"; fi; }
|
||||||
|
function yellow(){ if [ -t 1 ] && [ -n "$(tput colors)" ] && [ "$(tput colors)" -ge 8 ]; then echo -e "\\x1B[33m$1\\x1B[0m"; else echo "$1"; fi; }
|
||||||
|
function blue() { if [ -t 1 ] && [ -n "$(tput colors)" ] && [ "$(tput colors)" -ge 8 ]; then echo -e "\\x1B[34m$1\\x1B[0m"; else echo "$1"; fi; }
|
||||||
|
function purple(){ if [ -t 1 ] && [ -n "$(tput colors)" ] && [ "$(tput colors)" -ge 8 ]; then echo -e "\\x1B[35m$1\\x1B[0m"; else echo "$1"; fi; }
|
||||||
|
function cyan() { if [ -t 1 ] && [ -n "$(tput colors)" ] && [ "$(tput colors)" -ge 8 ]; then echo -e "\\x1B[36m$1\\x1B[0m"; else echo "$1"; fi; }
|
||||||
|
function white() { if [ -t 1 ] && [ -n "$(tput colors)" ] && [ "$(tput colors)" -ge 8 ]; then echo -e "\\x1B[37m$1\\x1B[0m"; else echo "$1"; fi; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
path_to_pubspec="$(dirname "$0")/../pubspec.yaml"
|
||||||
|
current_version=$(awk '/^version:/ {print $2}' $path_to_pubspec)
|
||||||
|
current_version_without_build=$(echo "$current_version" | sed 's/\+.*//')
|
||||||
|
|
||||||
|
gitcount="$(git log | grep "^commit" | wc -l | xargs)"
|
||||||
|
new_version="$current_version_without_build+$gitcount"
|
||||||
|
|
||||||
|
echo "Setting pubspec.yaml version $current_version to $new_version"
|
||||||
|
|
||||||
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
# macOS sed (requires a space after -i)
|
||||||
|
sed -i '' -e "s/version: $current_version/version: $new_version/g" $path_to_pubspec
|
||||||
|
else
|
||||||
|
# GNU sed (requires no space after -i)
|
||||||
|
sed -i'' -e "s/version: $current_version/version: $new_version/g" $path_to_pubspec
|
||||||
|
fi
|
117
flutter/analysis_options.yaml
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
|
||||||
|
include:
|
||||||
|
- package:lints/recommended.yaml
|
||||||
|
- package:flutter_lints/flutter.yaml
|
||||||
|
|
||||||
|
linter:
|
||||||
|
|
||||||
|
|
||||||
|
rules:
|
||||||
|
always_use_package_imports: true,
|
||||||
|
avoid_empty_else: true,
|
||||||
|
avoid_returning_null_for_future: true,
|
||||||
|
avoid_type_to_string: true,
|
||||||
|
avoid_types_as_parameter_names: true,
|
||||||
|
avoid_web_libraries_in_flutter: true,
|
||||||
|
collection_methods_unrelated_type: true,
|
||||||
|
discarded_futures: true,
|
||||||
|
empty_statements: true,
|
||||||
|
hash_and_equals: true,
|
||||||
|
implicit_reopen: true,
|
||||||
|
invalid_case_patterns: true,
|
||||||
|
invariant_booleans: true,
|
||||||
|
no_duplicate_case_values: true,
|
||||||
|
no_logic_in_create_state: true,
|
||||||
|
no_self_assignments: true,
|
||||||
|
no_wildcard_variable_uses: true,
|
||||||
|
prefer_void_to_null: true,
|
||||||
|
unnecessary_statements: true,
|
||||||
|
valid_regexps: true,
|
||||||
|
always_declare_return_types: true,
|
||||||
|
always_put_control_body_on_new_line: true,
|
||||||
|
always_specify_types: true,
|
||||||
|
annotate_overrides: true,
|
||||||
|
annotate_redeclares: true,
|
||||||
|
avoid_annotating_with_dynamic: true,
|
||||||
|
avoid_function_literals_in_foreach_calls: true,
|
||||||
|
avoid_init_to_null: true,
|
||||||
|
avoid_null_checks_in_equality_operators: true,
|
||||||
|
avoid_renaming_method_parameters: true,
|
||||||
|
avoid_return_types_on_setters: true,
|
||||||
|
avoid_returning_null: true,
|
||||||
|
avoid_returning_null_for_void: true,
|
||||||
|
avoid_returning_this: true,
|
||||||
|
avoid_shadowing_type_parameters: true,
|
||||||
|
avoid_single_cascade_in_expression_statements: true,
|
||||||
|
avoid_unnecessary_containers: true,
|
||||||
|
avoid_unused_constructor_parameters: true,
|
||||||
|
avoid_void_async: true,
|
||||||
|
await_only_futures: true,
|
||||||
|
camel_case_extensions: true,
|
||||||
|
camel_case_types: true,
|
||||||
|
cast_nullable_to_non_nullable: true,
|
||||||
|
constant_identifier_names: true,
|
||||||
|
empty_catches: true,
|
||||||
|
eol_at_end_of_file: true,
|
||||||
|
exhaustive_cases: true,
|
||||||
|
file_names: true,
|
||||||
|
no_literal_bool_comparisons: true,
|
||||||
|
null_check_on_nullable_type_parameter: true,
|
||||||
|
null_closures: true,
|
||||||
|
overridden_fields: true,
|
||||||
|
prefer_adjacent_string_concatenation: true,
|
||||||
|
prefer_collection_literals: true,
|
||||||
|
prefer_conditional_assignment: true,
|
||||||
|
prefer_const_constructors: true,
|
||||||
|
prefer_const_constructors_in_immutables: true,
|
||||||
|
prefer_const_declarations: true,
|
||||||
|
prefer_const_literals_to_create_immutables: true,
|
||||||
|
prefer_contains: true,
|
||||||
|
prefer_final_fields: true,
|
||||||
|
prefer_for_elements_to_map_fromIterable: true,
|
||||||
|
prefer_function_declarations_over_variables: true,
|
||||||
|
prefer_generic_function_type_aliases: true,
|
||||||
|
prefer_if_null_operators: true,
|
||||||
|
prefer_initializing_formals: true,
|
||||||
|
prefer_inlined_adds: true,
|
||||||
|
prefer_interpolation_to_compose_strings: true,
|
||||||
|
prefer_is_empty: true,
|
||||||
|
prefer_is_not_empty: true,
|
||||||
|
prefer_is_not_operator: true,
|
||||||
|
prefer_iterable_whereType: true,
|
||||||
|
prefer_null_aware_operators: true,
|
||||||
|
prefer_spread_collections: true,
|
||||||
|
prefer_typing_uninitialized_variables: true,
|
||||||
|
provide_deprecation_message: true,
|
||||||
|
recursive_getters: true,
|
||||||
|
sized_box_for_whitespace: true,
|
||||||
|
type_init_formals: true,
|
||||||
|
type_literal_in_constant_pattern: true,
|
||||||
|
unnecessary_const: true,
|
||||||
|
unnecessary_constructor_name: true,
|
||||||
|
unnecessary_getters_setters: true,
|
||||||
|
unnecessary_late: true,
|
||||||
|
unnecessary_new: true,
|
||||||
|
unnecessary_null_aware_assignments: true,
|
||||||
|
unnecessary_null_in_if_null_operators: true,
|
||||||
|
unnecessary_nullable_for_final_variable_declarations: true,
|
||||||
|
unnecessary_overrides: true,
|
||||||
|
unnecessary_string_escapes: true,
|
||||||
|
unnecessary_string_interpolations: true,
|
||||||
|
unnecessary_this: true,
|
||||||
|
unnecessary_to_list_in_spreads: true,
|
||||||
|
use_full_hex_values_for_flutter_colors: true,
|
||||||
|
use_function_type_syntax_for_parameters: true,
|
||||||
|
use_rethrow_when_possible: true,
|
||||||
|
use_string_in_part_of_directives: true,
|
||||||
|
use_super_parameters: true,
|
||||||
|
void_checks: true,
|
||||||
|
depend_on_referenced_packages: true,
|
||||||
|
package_names: true,
|
||||||
|
secure_pubspec_urls: true,
|
||||||
|
|
||||||
|
analyzer:
|
||||||
|
language:
|
||||||
|
strict-casts: true
|
||||||
|
strict-inference: true
|
||||||
|
strict-raw-types: true
|
17
flutter/android/.gitignore
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
gradle-wrapper.jar
|
||||||
|
/.gradle
|
||||||
|
/captures/
|
||||||
|
/gradlew
|
||||||
|
/gradlew.bat
|
||||||
|
/local.properties
|
||||||
|
GeneratedPluginRegistrant.java
|
||||||
|
|
||||||
|
# Remember to never publicly share your keystore.
|
||||||
|
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
|
||||||
|
key.properties
|
||||||
|
**/*.keystore
|
||||||
|
**/*.jks
|
||||||
|
|
||||||
|
build/
|
||||||
|
|
||||||
|
app/.cxx/
|
87
flutter/android/app/build.gradle
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
plugins {
|
||||||
|
id "com.android.application"
|
||||||
|
// START: FlutterFire Configuration
|
||||||
|
id 'com.google.gms.google-services'
|
||||||
|
// END: FlutterFire Configuration
|
||||||
|
id "kotlin-android"
|
||||||
|
id "dev.flutter.flutter-gradle-plugin"
|
||||||
|
}
|
||||||
|
|
||||||
|
def localProperties = new Properties()
|
||||||
|
def localPropertiesFile = rootProject.file('local.properties')
|
||||||
|
if (localPropertiesFile.exists()) {
|
||||||
|
localPropertiesFile.withReader('UTF-8') { reader ->
|
||||||
|
localProperties.load(reader)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
||||||
|
if (flutterVersionCode == null) {
|
||||||
|
flutterVersionCode = '1'
|
||||||
|
}
|
||||||
|
|
||||||
|
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
||||||
|
if (flutterVersionName == null) {
|
||||||
|
flutterVersionName = '1.0'
|
||||||
|
}
|
||||||
|
|
||||||
|
def keystoreProperties = new Properties()
|
||||||
|
def keystorePropertiesFile = rootProject.file('key.properties')
|
||||||
|
if (keystorePropertiesFile.exists()) {
|
||||||
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace "com.blackforestbytes.simplecloudnotifier"
|
||||||
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
ndkVersion "27.0.12077973" // should be `flutter.ndkVersion` - but some plugins need 27, even though flutter still has the default value of 26 (flutter 3.29 | 2025-04-12)
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
coreLibraryDesugaringEnabled true
|
||||||
|
sourceCompatibility JavaVersion.VERSION_17
|
||||||
|
targetCompatibility JavaVersion.VERSION_17
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = '17'
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main.java.srcDirs += 'src/main/kotlin'
|
||||||
|
}
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
applicationId "com.blackforestbytes.simplecloudnotifier"
|
||||||
|
minSdkVersion flutter.minSdkVersion
|
||||||
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
|
versionCode flutterVersionCode.toInteger()
|
||||||
|
versionName flutterVersionName
|
||||||
|
multiDexEnabled true
|
||||||
|
}
|
||||||
|
|
||||||
|
signingConfigs {
|
||||||
|
release {
|
||||||
|
keyAlias keystoreProperties['keyAlias']
|
||||||
|
keyPassword keystoreProperties['keyPassword']
|
||||||
|
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
|
||||||
|
storePassword keystoreProperties['storePassword']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
signingConfig signingConfigs.release
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
flutter {
|
||||||
|
source '../..'
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation 'androidx.window:window:1.0.0'
|
||||||
|
implementation 'androidx.window:window-java:1.0.0'
|
||||||
|
|
||||||
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
|
||||||
|
}
|
56
flutter/android/app/google-services.json
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "232728961679",
|
||||||
|
"firebase_url": "https://simplecloudnotifier-ea7ef.firebaseio.com",
|
||||||
|
"project_id": "simplecloudnotifier-ea7ef",
|
||||||
|
"storage_bucket": "simplecloudnotifier-ea7ef.appspot.com"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:232728961679:android:23c75317f79601c9",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.blackforestbytes.simplecloudnotifier"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "232728961679-o7gig6f684mp1l1ok7719v3jf3csejc1.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.blackforestbytes.simplecloudnotifier",
|
||||||
|
"certificate_hash": "3bcafbd39256422f0cb51fd446a228c26543afb4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "232728961679-t1h2eo5keha2lrvhsvdr5kgbkbfkja0o.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyBasR6JLAjM5Ut0rPb0euE_9DdDoTkcvKQ"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "232728961679-f2951kg24ngsttkhd96qhcr8j3lc8nnk.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "232728961679-bsbtc6orskaqafc8gtsuqia53f6ree48.apps.googleusercontent.com",
|
||||||
|
"client_type": 2,
|
||||||
|
"ios_info": {
|
||||||
|
"bundle_id": "com.blackforestbytes.SimpleCloudNotifier",
|
||||||
|
"app_store_id": "6455594868"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
27
flutter/android/app/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
## Gson rules
|
||||||
|
# Gson uses generic type information stored in a class file when working with fields. Proguard
|
||||||
|
# removes such information by default, so configure it to keep all of it.
|
||||||
|
-keepattributes Signature
|
||||||
|
|
||||||
|
# For using GSON @Expose annotation
|
||||||
|
-keepattributes *Annotation*
|
||||||
|
|
||||||
|
# Gson specific classes
|
||||||
|
-dontwarn sun.misc.**
|
||||||
|
#-keep class com.google.gson.stream.** { *; }
|
||||||
|
|
||||||
|
# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
|
||||||
|
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
|
||||||
|
-keep class * extends com.google.gson.TypeAdapter
|
||||||
|
-keep class * implements com.google.gson.TypeAdapterFactory
|
||||||
|
-keep class * implements com.google.gson.JsonSerializer
|
||||||
|
-keep class * implements com.google.gson.JsonDeserializer
|
||||||
|
|
||||||
|
# Prevent R8 from leaving Data object members always null
|
||||||
|
-keepclassmembers,allowobfuscation class * {
|
||||||
|
@com.google.gson.annotations.SerializedName <fields>;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher.
|
||||||
|
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
|
||||||
|
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
|
7
flutter/android/app/src/debug/AndroidManifest.xml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<!-- The INTERNET permission is required for development. Specifically,
|
||||||
|
the Flutter tool needs it to communicate with the running application
|
||||||
|
to allow setting breakpoints, to provide hot reload, etc.
|
||||||
|
-->
|
||||||
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
|
</manifest>
|
43
flutter/android/app/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
|
<uses-permission android:name="android.permission.VIBRATE" />
|
||||||
|
<uses-permission android:name="com.android.vending.BILLING" />
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:label="simplecloudnotifier"
|
||||||
|
android:name="${applicationName}"
|
||||||
|
android:icon="@mipmap/launcher_icon">
|
||||||
|
<activity
|
||||||
|
android:name=".MainActivity"
|
||||||
|
android:exported="true"
|
||||||
|
android:launchMode="singleTop"
|
||||||
|
android:theme="@style/LaunchTheme"
|
||||||
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||||
|
android:hardwareAccelerated="true"
|
||||||
|
android:windowSoftInputMode="adjustResize">
|
||||||
|
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||||
|
the Android process has started. This theme is visible to the user
|
||||||
|
while the Flutter UI initializes. After that, this theme continues
|
||||||
|
to determine the Window background behind the Flutter UI. -->
|
||||||
|
<meta-data
|
||||||
|
android:name="io.flutter.embedding.android.NormalTheme"
|
||||||
|
android:resource="@style/NormalTheme"
|
||||||
|
/>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN"/>
|
||||||
|
<category android:name="android.intent.category.LAUNCHER"/>
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
<receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ActionBroadcastReceiver" />
|
||||||
|
|
||||||
|
<!-- Don't delete the meta-data below.
|
||||||
|
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||||
|
<meta-data
|
||||||
|
android:name="flutterEmbedding"
|
||||||
|
android:value="2" />
|
||||||
|
</application>
|
||||||
|
</manifest>
|
@ -0,0 +1,6 @@
|
|||||||
|
package com.blackforestbytes.simplecloudnotifier
|
||||||
|
|
||||||
|
import io.flutter.embedding.android.FlutterActivity
|
||||||
|
|
||||||
|
class MainActivity: FlutterActivity() {
|
||||||
|
}
|
After Width: | Height: | Size: 472 B |
After Width: | Height: | Size: 320 B |
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Modify this file to customize your launch splash screen -->
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="?android:colorBackground" />
|
||||||
|
|
||||||
|
<!-- You can insert your own image assets here -->
|
||||||
|
<!-- <item>
|
||||||
|
<bitmap
|
||||||
|
android:gravity="center"
|
||||||
|
android:src="@mipmap/launch_image" />
|
||||||
|
</item> -->
|
||||||
|
</layer-list>
|
@ -0,0 +1,34 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportHeight="108"
|
||||||
|
android:viewportWidth="108">
|
||||||
|
<path
|
||||||
|
android:fillType="evenOdd"
|
||||||
|
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
|
||||||
|
android:strokeColor="#00000000"
|
||||||
|
android:strokeWidth="1">
|
||||||
|
<aapt:attr name="android:fillColor">
|
||||||
|
<gradient
|
||||||
|
android:endX="78.5885"
|
||||||
|
android:endY="90.9159"
|
||||||
|
android:startX="48.7653"
|
||||||
|
android:startY="61.0927"
|
||||||
|
android:type="linear">
|
||||||
|
<item
|
||||||
|
android:color="#44000000"
|
||||||
|
android:offset="0.0" />
|
||||||
|
<item
|
||||||
|
android:color="#00000000"
|
||||||
|
android:offset="1.0" />
|
||||||
|
</gradient>
|
||||||
|
</aapt:attr>
|
||||||
|
</path>
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFF"
|
||||||
|
android:fillType="nonZero"
|
||||||
|
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
|
||||||
|
android:strokeColor="#00000000"
|
||||||
|
android:strokeWidth="1" />
|
||||||
|
</vector>
|
After Width: | Height: | Size: 551 B |
After Width: | Height: | Size: 949 B |
After Width: | Height: | Size: 1.0 KiB |
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Modify this file to customize your launch splash screen -->
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="@android:color/white" />
|
||||||
|
|
||||||
|
<!-- You can insert your own image assets here -->
|
||||||
|
<!-- <item>
|
||||||
|
<bitmap
|
||||||
|
android:gravity="center"
|
||||||
|
android:src="@mipmap/launch_image" />
|
||||||
|
</item> -->
|
||||||
|
</layer-list>
|
BIN
flutter/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 544 B |
BIN
flutter/android/app/src/main/res/mipmap-hdpi/launcher_icon.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
flutter/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 442 B |
BIN
flutter/android/app/src/main/res/mipmap-mdpi/launcher_icon.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
flutter/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 721 B |
BIN
flutter/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png
Normal file
After Width: | Height: | Size: 7.5 KiB |
BIN
flutter/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
flutter/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
flutter/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 19 KiB |
2
flutter/android/app/src/main/res/raw/keep.xml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources xmlns:tools="http://schemas.android.com/tools" tools:keep="@drawable/*" />
|
18
flutter/android/app/src/main/res/values-night/styles.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||||
|
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||||
|
<!-- Show a splash screen on the activity. Automatically removed when
|
||||||
|
the Flutter engine draws its first frame -->
|
||||||
|
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||||
|
</style>
|
||||||
|
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||||
|
This theme determines the color of the Android Window while your
|
||||||
|
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||||
|
running.
|
||||||
|
|
||||||
|
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||||
|
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||||
|
<item name="android:windowBackground">?android:colorBackground</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
18
flutter/android/app/src/main/res/values/styles.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||||
|
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||||
|
<!-- Show a splash screen on the activity. Automatically removed when
|
||||||
|
the Flutter engine draws its first frame -->
|
||||||
|
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||||
|
</style>
|
||||||
|
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||||
|
This theme determines the color of the Android Window while your
|
||||||
|
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||||
|
running.
|
||||||
|
|
||||||
|
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||||
|
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||||
|
<item name="android:windowBackground">?android:colorBackground</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
7
flutter/android/app/src/profile/AndroidManifest.xml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<!-- The INTERNET permission is required for development. Specifically,
|
||||||
|
the Flutter tool needs it to communicate with the running application
|
||||||
|
to allow setting breakpoints, to provide hot reload, etc.
|
||||||
|
-->
|
||||||
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
|
</manifest>
|
18
flutter/android/build.gradle
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
allprojects {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rootProject.buildDir = '../build'
|
||||||
|
subprojects {
|
||||||
|
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||||
|
}
|
||||||
|
subprojects {
|
||||||
|
project.evaluationDependsOn(':app')
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register("clean", Delete) {
|
||||||
|
delete rootProject.buildDir
|
||||||
|
}
|
3
flutter/android/gradle.properties
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
org.gradle.jvmargs=-Xmx4G
|
||||||
|
android.useAndroidX=true
|
||||||
|
android.enableJetifier=true
|
5
flutter/android/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionPath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
zipStorePath=wrapper/dists
|
33
flutter/android/settings.gradle
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
pluginManagement {
|
||||||
|
def flutterSdkPath = {
|
||||||
|
def properties = new Properties()
|
||||||
|
file("local.properties").withInputStream { properties.load(it) }
|
||||||
|
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||||
|
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
||||||
|
return flutterSdkPath
|
||||||
|
}
|
||||||
|
settings.ext.flutterSdkPath = flutterSdkPath()
|
||||||
|
|
||||||
|
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||||
|
id "com.android.application" version "8.9.1" apply false
|
||||||
|
id "org.jetbrains.kotlin.android" version "2.1.10" apply false
|
||||||
|
// START: FlutterFire Configuration
|
||||||
|
id "com.google.gms.google-services" version "4.3.15" apply false
|
||||||
|
// END: FlutterFire Configuration
|
||||||
|
}
|
||||||
|
|
||||||
|
include ":app"
|
38
flutter/deps/font_awesome_flutter/.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to help us improve
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
Steps to reproduce the behavior:
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Desktop (please complete the following information):**
|
||||||
|
- OS: [e.g. iOS]
|
||||||
|
- Browser [e.g. chrome, safari]
|
||||||
|
- Version [e.g. 22]
|
||||||
|
|
||||||
|
**Smartphone (please complete the following information):**
|
||||||
|
- Device: [e.g. iPhone6]
|
||||||
|
- OS: [e.g. iOS8.1]
|
||||||
|
- Browser [e.g. stock browser, safari]
|
||||||
|
- Version [e.g. 22]
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
20
flutter/deps/font_awesome_flutter/.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Is your feature request related to a problem? Please describe.**
|
||||||
|
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**Describe alternatives you've considered**
|
||||||
|
A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context or screenshots about the feature request here.
|
12
flutter/deps/font_awesome_flutter/.github/ISSUE_TEMPLATE/missing-icon.md
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
name: Missing Icon
|
||||||
|
about: Handles Requests for Missing Icons
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Before submitting this issue, please double-check if the icon is a pro icon on the Font Awesome website. It will say something like "Start using this pro icon."
|
||||||
|
|
||||||
|
This package only includes the free icons by default. To use pro icons, you must purchase a license and follow the instructions found in the README.md file.
|
12
flutter/deps/font_awesome_flutter/.gitignore
vendored
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
.DS_Store
|
||||||
|
.atom/
|
||||||
|
.idea
|
||||||
|
.packages
|
||||||
|
.dart_tool/
|
||||||
|
.pub/
|
||||||
|
build/
|
||||||
|
ios/.generated/
|
||||||
|
packages
|
||||||
|
pubspec.lock
|
||||||
|
.flutter-plugins
|
||||||
|
local.properties
|
175
flutter/deps/font_awesome_flutter/CHANGELOG.md
Normal file
@ -0,0 +1,175 @@
|
|||||||
|
## 10.7.0
|
||||||
|
* Upgrade to Font Awesome 6.5.1
|
||||||
|
|
||||||
|
## 10.6.0
|
||||||
|
* Upgrade to Font Awesome 6.4.2
|
||||||
|
* Add @staticIconProvider annotation
|
||||||
|
* Add `shadows` property to FaIcon - thanks @RomainFranceschini!
|
||||||
|
|
||||||
|
## 10.5.1
|
||||||
|
* Hotfix #244 - regular font still used
|
||||||
|
* Update package description icon count
|
||||||
|
|
||||||
|
## 10.5.0
|
||||||
|
* Fix #244 - dynamic icon retrieval requires regular font
|
||||||
|
* BREAKING: getIconFromCss now returns null if no matching icon is found
|
||||||
|
* Upgrade to Font Awesome 6.4.0
|
||||||
|
* Migrate to Flutter 3 - thanks @jinosh05
|
||||||
|
|
||||||
|
## 10.4.0
|
||||||
|
* Upgrade to Font Awesome 6.3.0
|
||||||
|
* Fix: doc misspells function - thanks @ulrikkold !
|
||||||
|
|
||||||
|
## 10.3.0
|
||||||
|
* Upgrade to Font Awesome 6.2.1
|
||||||
|
* Fix #227: fix deprecated isAlwaysShown property
|
||||||
|
|
||||||
|
## 10.2.1
|
||||||
|
* Update font awesome version in readme
|
||||||
|
|
||||||
|
## 10.2.0
|
||||||
|
* Remove duotone generator functionality from configurator
|
||||||
|
* Upgrade to Font Awesome 6.2.0
|
||||||
|
|
||||||
|
## 10.1.0
|
||||||
|
* Upgrade to Font Awesome 6.1.1
|
||||||
|
* Perform automatic update check on configurator run
|
||||||
|
|
||||||
|
## 10.0.0
|
||||||
|
* Upgrade to Font Awesome icons 6.1.0
|
||||||
|
* Update the configurator to work with version 6
|
||||||
|
* Add alias support
|
||||||
|
(Aliases may be old names of renamed icons.
|
||||||
|
Since it is unclear if they are about to stay,
|
||||||
|
aliases are marked as @Deprecated with a message containing the new icon name.)
|
||||||
|
* Update FaIcon with the latest changes to flutter's default Icon
|
||||||
|
* DEPRECATE duotone icon support for pro users
|
||||||
|
* Fix linter warnings - thanks to @gslender!
|
||||||
|
|
||||||
|
## 9.2.0
|
||||||
|
* Upgrade to Font Awesome icons 5.15.4
|
||||||
|
* Equalize windows and linux tool scripts
|
||||||
|
* Reworked updater tool into a full-fledged configurator
|
||||||
|
* Added support for ignoring styles
|
||||||
|
* Added optional support for dynamic icon retrieval by name (thanks to @Mythar)
|
||||||
|
* Fonts get enabled/disabled automatically based on availability and exclude list
|
||||||
|
|
||||||
|
## 9.1.0
|
||||||
|
* Add support for fa6's 360-degrees icon
|
||||||
|
* Fix #154 FaDuotoneIcon explicitly requires IconDataDuotone
|
||||||
|
* Use `dart format` instead of deprecated `dartfmt` in the updater
|
||||||
|
* Automatically enable duotone icons in the example if possible
|
||||||
|
* Upgrade to Font Awesome icons 5.15.3
|
||||||
|
|
||||||
|
Thanks to @amkuchta for his work and input
|
||||||
|
|
||||||
|
## 9.0.0
|
||||||
|
* Add support for null-safety
|
||||||
|
|
||||||
|
## 8.12.0
|
||||||
|
* Upgrade to Font Awesome icons 5.15.2
|
||||||
|
* Add support for font awesome 6's number icons
|
||||||
|
|
||||||
|
## 8.11.0
|
||||||
|
* Add support for font awesome 6's thin icons
|
||||||
|
|
||||||
|
## 8.10.2
|
||||||
|
* Fix missing keys in FaDuotoneIcon
|
||||||
|
* Fix icon tree shaking build error for duotone icons
|
||||||
|
|
||||||
|
## 8.10.1
|
||||||
|
* Update license file with MIT header
|
||||||
|
* Update readme links
|
||||||
|
|
||||||
|
## 8.10.0
|
||||||
|
* Fix #119: Inverted colors for duotone icons
|
||||||
|
* Fix #122: Build failure due to missing glyphs in web fonts
|
||||||
|
* Upgrade to Font Awesome icons 5.15.1
|
||||||
|
|
||||||
|
## 8.9.0
|
||||||
|
* Upgrade to Font Awesome icons 5.15
|
||||||
|
|
||||||
|
## 8.8.1
|
||||||
|
* Fix icon_data.dart not being accessible
|
||||||
|
|
||||||
|
## 8.8.0
|
||||||
|
* Upgrade to Font Awesome Icons 5.13
|
||||||
|
|
||||||
|
## 8.7.0
|
||||||
|
|
||||||
|
* Add `FaIcon` widget for Font Awesome Icons
|
||||||
|
* Update `README` with FAQ
|
||||||
|
|
||||||
|
## 8.6.0
|
||||||
|
* Move package to FlutterCommunity
|
||||||
|
* Upgrade to Font Awesome Icons 5.12.1
|
||||||
|
* Directions to support pro icons if you've purchased them (thanks @michaelspiss!)
|
||||||
|
|
||||||
|
## 8.5.0
|
||||||
|
* Upgrade to Font Awesome Icons 5.9
|
||||||
|
|
||||||
|
## 8.4.0
|
||||||
|
|
||||||
|
* FIX BAD BUILD - 8.3.0 had a problem with the update Script, please do not use!
|
||||||
|
* Upgrade to Font Awesome Icons 5.7
|
||||||
|
|
||||||
|
## 8.3.0
|
||||||
|
|
||||||
|
* Upgrade to Font Awesome Icons 5.7
|
||||||
|
|
||||||
|
## 8.2.0
|
||||||
|
|
||||||
|
* Upgrade to Font Awesome Icons 5.5
|
||||||
|
|
||||||
|
## 8.1.0
|
||||||
|
|
||||||
|
* Upgrade to Font Awesome Icons 5.3.1
|
||||||
|
|
||||||
|
## 8.0.1
|
||||||
|
|
||||||
|
* Fix documentation
|
||||||
|
|
||||||
|
## 8.0.0
|
||||||
|
|
||||||
|
* Upgrade environment version constraint for Dart 2
|
||||||
|
* Upgrade to font awesome icons 5.2.0
|
||||||
|
|
||||||
|
## 7.1.0
|
||||||
|
|
||||||
|
* Upgrade to font awesome icons 5.1.0
|
||||||
|
|
||||||
|
## 7.0.0
|
||||||
|
|
||||||
|
* Renames:
|
||||||
|
- All icons that end with capital-O (for outline) have been renamed. E.g. `addressBookO` has been renamed `addressBook`
|
||||||
|
- All solid icons have been renamed to `solidIconName`. E.g. `addressBook` renamed `solidAddressBook`
|
||||||
|
* Generate Icon pack based on JSON definition from source. Much easier upgrades / maintenance / consistency going forward! Big thanks to @pplante on Github for the contribution :)
|
||||||
|
* Move fonts into the `lib` folder.
|
||||||
|
|
||||||
|
## 6.0.0
|
||||||
|
|
||||||
|
* Update to Font Awesome Icons 5.0.2, which includes tons of new Icons!
|
||||||
|
|
||||||
|
## 5.0.0
|
||||||
|
|
||||||
|
* semver mistake: 4.7.3 should have been a major bump as it involves breaking changes.
|
||||||
|
|
||||||
|
## 4.7.3
|
||||||
|
|
||||||
|
* Simpler Install: Remove the need to specify the font in your own pubspec.yaml
|
||||||
|
|
||||||
|
## 4.7.2
|
||||||
|
|
||||||
|
* MOAR README updates
|
||||||
|
|
||||||
|
## 4.7.1
|
||||||
|
|
||||||
|
* README fix
|
||||||
|
|
||||||
|
## 4.7.0
|
||||||
|
|
||||||
|
* Expose Font Awesome 4.7.0 `woff` font asset. This was the smallest version of the font file that worked with Flutter.
|
||||||
|
* Created `FontAwesomeIcons` class, which provides static access to all Font Awesome 4.7.0 Icons as `IconData`, similar to Flutter's built-in `Icons` class.
|
||||||
|
* Created a Gallery App that can be used to view all provided icons
|
||||||
|
* Created README with installation instructions
|
||||||
|
* Added LICENSE.md file
|
24
flutter/deps/font_awesome_flutter/LICENSE
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2017 Brian Egan
|
||||||
|
Copyright (c) 2020 Michael Spiss
|
||||||
|
Font Awesome Icons by @fontawesome - https://fontawesome.com
|
||||||
|
License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1)
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
204
flutter/deps/font_awesome_flutter/README.md
Executable file
@ -0,0 +1,204 @@
|
|||||||
|
# font_awesome_flutter
|
||||||
|
|
||||||
|
[](https://github.com/fluttercommunity/community)
|
||||||
|
|
||||||
|
[](https://pub.dartlang.org/packages/font_awesome_flutter)
|
||||||
|
|
||||||
|
The *free* [Font Awesome](https://fontawesome.com/icons) Icon pack available
|
||||||
|
as set of Flutter Icons - based on font awesome version 6.5.1.
|
||||||
|
|
||||||
|
This icon pack includes only the *free* icons offered by Font Awesome out-of-the-box.
|
||||||
|
If you have purchased the pro icons and want to enable support for them, please see the instructions below.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
In the `dependencies:` section of your `pubspec.yaml`, add the following line:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
dependencies:
|
||||||
|
font_awesome_flutter: <latest_version>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```dart
|
||||||
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
|
|
||||||
|
class MyWidget extends StatelessWidget {
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return IconButton(
|
||||||
|
// Use the FaIcon Widget + FontAwesomeIcons class for the IconData
|
||||||
|
icon: FaIcon(FontAwesomeIcons.gamepad),
|
||||||
|
onPressed: () { print("Pressed"); }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Icon names
|
||||||
|
|
||||||
|
Icon names equal those on the [official website](https://fontawesome.com/icons), but are written in lower camel case. If more than one icon style is available for an icon, the style name is used as prefix, except for "regular".
|
||||||
|
Due to restrictions in dart, icons starting with numbers have those numbers written out.
|
||||||
|
|
||||||
|
#### Examples:
|
||||||
|
| Icon name | Code | Style|
|
||||||
|
|---------------------------------------------------------------------------------------| --- | ---|
|
||||||
|
| [angle-double-up](https://fontawesome.com/icons/angle-double-up?style=solid) | `FontAwesomeIcons.angleDoubleUp` | solid _(this icon does not have other free styles)_ |
|
||||||
|
| [arrow-alt-circle-up](https://fontawesome.com/icons/arrow-alt-circle-up?style=regular) | `FontAwesomeIcons.arrowAltCircleUp` | regular |
|
||||||
|
| [arrow-alt-circle-up](https://fontawesome.com/icons/arrow-alt-circle-up?style=solid) | `FontAwesomeIcons.solidArrowAltCircleUp` | solid |
|
||||||
|
| [1](https://fontawesome.com/icons/1?style=solid) | `FontAwesomeIcons.solidOne` | solid |
|
||||||
|
|
||||||
|
## Example App
|
||||||
|
|
||||||
|
View the Flutter app in the `example` directory to see all the available `FontAwesomeIcons`.
|
||||||
|
|
||||||
|
## Customizing font awesome flutter
|
||||||
|
|
||||||
|
We supply a configurator tool to assist you with common customizations to this package.
|
||||||
|
All options are interoperable.
|
||||||
|
By default, if run without arguments and no `icons.json` in `lib/fonts` exists, it updates all icons to the
|
||||||
|
newest free version of font awesome.
|
||||||
|
|
||||||
|
### Setup
|
||||||
|
To use your custom version, you must first clone [this repository](https://github.com/fluttercommunity/font_awesome_flutter.git)
|
||||||
|
to a location of your choice and run `flutter pub get` inside. This installs all dependencies.
|
||||||
|
|
||||||
|
The configurator is located in the `util` folder and can be started by running `configurator.bat` on Windows, or
|
||||||
|
`./configurator.sh` on linux and mac. All following examples use the `.sh` version, but work same for `.bat`.
|
||||||
|
(If on windows, omit the `./` or replace it with `.\`.)
|
||||||
|
An overview of available options can be viewed with `./configurator.sh --help`.
|
||||||
|
|
||||||
|
To use your customized version in an app, go to the app's `pubspec.yaml` and add a dependency for
|
||||||
|
`font_awesome_flutter: '>= 4.7.0'`. Then override the dependency's location:
|
||||||
|
```yaml
|
||||||
|
dependencies:
|
||||||
|
font_awesome_flutter: '>= 4.7.0'
|
||||||
|
...
|
||||||
|
|
||||||
|
dependency_overrides:
|
||||||
|
font_awesome_flutter:
|
||||||
|
path: path/to/your/font_awesome_flutter
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
### Enable pro icons
|
||||||
|
:exclamation: By importing pro icons you acknowledge that it is your obligation
|
||||||
|
to keep these files private. This includes **not** uploading your package to
|
||||||
|
a public github repository or other public file sharing services.
|
||||||
|
|
||||||
|
* Go to the location of your custom font_awesome_flutter version (see [setup](#setup))
|
||||||
|
* Download the web version of font awesome pro and open it
|
||||||
|
* Move **all** `.ttf` files from the `webfonts` directory and `icons.json` from `metadata` to
|
||||||
|
`path/to/your/font_awesome_flutter/lib/fonts`. Replace existing files.
|
||||||
|
* Run the configurator. It should say "Custom icons.json found"
|
||||||
|
|
||||||
|
It may be required to run `flutter clean` in apps who use this version for changes to appear.
|
||||||
|
|
||||||
|
### Excluding styles
|
||||||
|
One or more styles can be excluded from all generation processes by passing them with the `--exclude` option:
|
||||||
|
```
|
||||||
|
$ ./configurator.sh --exclude solid
|
||||||
|
$ ./configurator.sh --exclude solid,brands
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [optimizations](#what-about-file-size-and-ram-usage) and [dynamic icon retrieval by name](#retrieve-icons-dynamically-by-their-name-or-css-class)
|
||||||
|
sections for more information as to why it makes sense for your app.
|
||||||
|
|
||||||
|
### Retrieve icons dynamically by their name or css class
|
||||||
|
Probably the most requested feature after support for pro icons is the ability to retrieve an icon by their name.
|
||||||
|
This was previously not possible, because a mapping from name to icon would break all
|
||||||
|
[discussed optimizations](#what-about-file-size-and-ram-usage). Please bear in mind that this is still the case.
|
||||||
|
As all icons could theoretically be requested, none can be removed by flutter. It is strongly advised to only use this
|
||||||
|
option in conjunction with [a limited set of styles](#excluding-styles) and with as few of them as possible. You may
|
||||||
|
need to build your app with the `--no-tree-shake-icons` flag for it to succeed.
|
||||||
|
|
||||||
|
Using the new configurator tool, this is now an optional feature. Run the tool with the `--dynamic` flag to generate...
|
||||||
|
```
|
||||||
|
$ ./configurator.sh --dynamic
|
||||||
|
```
|
||||||
|
...and the following import to use the map. For normal icons, use `faIconNameMapping` with a key of this format:
|
||||||
|
'style icon-name'.
|
||||||
|
```dart
|
||||||
|
import 'package:font_awesome_flutter/name_icon_mapping.dart';
|
||||||
|
|
||||||
|
...
|
||||||
|
FaIcon(faIconNameMapping['solid abacus']);
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
To exclude unused styles combine the configurator options:
|
||||||
|
```
|
||||||
|
$ ./configurator.sh --dynamic --exclude solid
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
A common use case also includes fetching css classes from a server. The utility function `getIconFromCss()` takes a
|
||||||
|
string of classes and returns the icon which would be shown by a browser:
|
||||||
|
```dart
|
||||||
|
getIconFromCss('far custom-class fa-abacus'); // returns the abacus icon in regular style. custom-class is ignored
|
||||||
|
```
|
||||||
|
|
||||||
|
## Duotone icons
|
||||||
|
|
||||||
|
Duotone support has been discontinued after font awesome changed the way they lay out the icon glyphs inside the font's
|
||||||
|
file. The new way using ligatures is not supported by flutter at the moment.
|
||||||
|
|
||||||
|
For more information on why duotone icon support was discontinued, see
|
||||||
|
[this comment](https://github.com/fluttercommunity/font_awesome_flutter/issues/192#issuecomment-1073003668).
|
||||||
|
|
||||||
|
## FAQ
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><h3>Why aren't the icons aligned properly or why are the icons being cut off?</h3></summary>
|
||||||
|
Please use the `FaIcon` widget provided by the library instead of the `Icon`
|
||||||
|
widget provided by Flutter. The `Icon` widget assumes all icons are square, but
|
||||||
|
many Font Awesome Icons are not.
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><h3>What about file size and ram usage</h3></summary>
|
||||||
|
This package has been written in a way so that it only uses the minimum amount of resources required.
|
||||||
|
|
||||||
|
All links (eg. `FontAwesomeIcons.abacus`) to unused icons will be removed automatically, which means only required icon
|
||||||
|
definitions are loaded into ram.
|
||||||
|
|
||||||
|
Flutter 1.22 added icon tree shaking. This means unused icon "images" will be removed as well. However, this only
|
||||||
|
applies to styles of which at least one icon has been used. Assuming only icons of style "regular" are being used,
|
||||||
|
"regular" will be minified to only include the used icons and "solid" and "brands" will stay in their raw, complete
|
||||||
|
form. This issue is being [tracked over in the flutter repository](https://github.com/flutter/flutter/issues/64106).
|
||||||
|
|
||||||
|
However, using the configurator, you can easily exclude styles from the package. For more information, see
|
||||||
|
[customizing font awesome flutter](#customizing-font-awesome-flutter)
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><h3>Why aren't the icons showing up on Mobile devices?</h3></summary>
|
||||||
|
If you're not seeing any icons at all, sometimes it means that Flutter has a cached version of the app on device and
|
||||||
|
hasn't pushed the new fonts. I've run into that as well a few times...
|
||||||
|
|
||||||
|
Please try:
|
||||||
|
|
||||||
|
1. Stopping the app
|
||||||
|
2. Running `flutter clean` in your app directory
|
||||||
|
3. Deleting the app from your simulator / emulator / device
|
||||||
|
4. Rebuild & Deploy the app.
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><h3>Why aren't the icons showing up on Web?</h3></summary>
|
||||||
|
Most likely, the fonts were not correctly added to the `FontManifest.json`.
|
||||||
|
Note: older versions of Flutter did not properly package non-Material fonts
|
||||||
|
in the `FontManifest.json` during the build step, but that issue has been
|
||||||
|
resolved and this shouldn't be much of a problem these days.
|
||||||
|
|
||||||
|
Please ensure you are using `Flutter 1.14.6 beta` or newer!
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><h3>Why does mac/linux not run the configurator?</h3></summary>
|
||||||
|
This is most probably due to missing file permissions. Downloaded scripts cannot be executed by default.
|
||||||
|
|
||||||
|
Either give the execute permission to `util/configurator.sh` with `$ chmod +x configurator.sh` or run the commands by prepending an `sh`:
|
||||||
|
|
||||||
|
`$ sh ./configurator.sh`
|
||||||
|
</details>
|
29
flutter/deps/font_awesome_flutter/analysis_options.yaml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# This file configures the analyzer, which statically analyzes Dart code to
|
||||||
|
# check for errors, warnings, and lints.
|
||||||
|
#
|
||||||
|
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
|
||||||
|
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
|
||||||
|
# invoked from the command line by running `flutter analyze`.
|
||||||
|
|
||||||
|
# The following line activates a set of recommended lints for Flutter apps,
|
||||||
|
# packages, and plugins designed to encourage good coding practices.
|
||||||
|
include: package:flutter_lints/flutter.yaml
|
||||||
|
|
||||||
|
linter:
|
||||||
|
# The lint rules applied to this project can be customized in the
|
||||||
|
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
|
||||||
|
# included above or to enable additional rules. A list of all available lints
|
||||||
|
# and their documentation is published at
|
||||||
|
# https://dart-lang.github.io/linter/lints/index.html.
|
||||||
|
#
|
||||||
|
# Instead of disabling a lint rule for the entire project in the
|
||||||
|
# section below, it can also be suppressed for a single line of code
|
||||||
|
# or a specific dart file by using the `// ignore: name_of_lint` and
|
||||||
|
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
|
||||||
|
# producing the lint.
|
||||||
|
rules:
|
||||||
|
# avoid_print: false # Uncomment to disable the `avoid_print` rule
|
||||||
|
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
||||||
|
|
||||||
|
# Additional information about this file can be found at
|
||||||
|
# https://dart.dev/guides/language/analysis-options
|
10
flutter/deps/font_awesome_flutter/example/.gitignore
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
.DS_Store
|
||||||
|
.atom/
|
||||||
|
.idea
|
||||||
|
.packages
|
||||||
|
.pub/
|
||||||
|
build/
|
||||||
|
ios/.generated/
|
||||||
|
packages
|
||||||
|
pubspec.lock
|
||||||
|
.flutter-plugins
|
10
flutter/deps/font_awesome_flutter/example/.metadata
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# This file tracks properties of this Flutter project.
|
||||||
|
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||||
|
#
|
||||||
|
# This file should be version controlled and should not be manually edited.
|
||||||
|
|
||||||
|
version:
|
||||||
|
revision: fabeb2a16f1d008ab8230f450c49141d35669798
|
||||||
|
channel: beta
|
||||||
|
|
||||||
|
project_type: app
|
1
flutter/deps/font_awesome_flutter/example/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
This package includes an example flutter project. To view it, please go to https://github.com/brianegan/font_awesome_flutter/tree/master/example
|
7
flutter/deps/font_awesome_flutter/example/android/.gitignore
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
gradle-wrapper.jar
|
||||||
|
/.gradle
|
||||||
|
/captures/
|
||||||
|
/gradlew
|
||||||
|
/gradlew.bat
|
||||||
|
/local.properties
|
||||||
|
GeneratedPluginRegistrant.java
|
@ -0,0 +1,67 @@
|
|||||||
|
def localProperties = new Properties()
|
||||||
|
def localPropertiesFile = rootProject.file('local.properties')
|
||||||
|
if (localPropertiesFile.exists()) {
|
||||||
|
localPropertiesFile.withReader('UTF-8') { reader ->
|
||||||
|
localProperties.load(reader)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def flutterRoot = localProperties.getProperty('flutter.sdk')
|
||||||
|
if (flutterRoot == null) {
|
||||||
|
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
||||||
|
}
|
||||||
|
|
||||||
|
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
||||||
|
if (flutterVersionCode == null) {
|
||||||
|
flutterVersionCode = '1'
|
||||||
|
}
|
||||||
|
|
||||||
|
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
||||||
|
if (flutterVersionName == null) {
|
||||||
|
flutterVersionName = '1.0'
|
||||||
|
}
|
||||||
|
|
||||||
|
apply plugin: 'com.android.application'
|
||||||
|
apply plugin: 'kotlin-android'
|
||||||
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdkVersion 28
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main.java.srcDirs += 'src/main/kotlin'
|
||||||
|
}
|
||||||
|
|
||||||
|
lintOptions {
|
||||||
|
disable 'InvalidPackage'
|
||||||
|
}
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
|
applicationId "com.example.example"
|
||||||
|
minSdkVersion 16
|
||||||
|
targetSdkVersion 28
|
||||||
|
versionCode flutterVersionCode.toInteger()
|
||||||
|
versionName flutterVersionName
|
||||||
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
// TODO: Add your own signing config for the release build.
|
||||||
|
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||||
|
signingConfig signingConfigs.debug
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
flutter {
|
||||||
|
source '../..'
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||||
|
testImplementation 'junit:junit:4.12'
|
||||||
|
androidTestImplementation 'androidx.test:runner:1.1.1'
|
||||||
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.example.example">
|
||||||
|
<!-- Flutter needs it to communicate with the running application
|
||||||
|
to allow setting breakpoints, to provide hot reload, etc.
|
||||||
|
-->
|
||||||
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
|
</manifest>
|
@ -0,0 +1,47 @@
|
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.example.example">
|
||||||
|
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
|
||||||
|
calls FlutterMain.startInitialization(this); in its onCreate method.
|
||||||
|
In most cases you can leave this as-is, but you if you want to provide
|
||||||
|
additional functionality it is fine to subclass or reimplement
|
||||||
|
FlutterApplication and put your custom class here. -->
|
||||||
|
<application
|
||||||
|
android:name="${applicationName}"
|
||||||
|
android:label="example"
|
||||||
|
android:icon="@mipmap/ic_launcher">
|
||||||
|
<activity
|
||||||
|
android:name="io.flutter.embedding.android.FlutterActivity"
|
||||||
|
android:launchMode="singleTop"
|
||||||
|
android:theme="@style/LaunchTheme"
|
||||||
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||||
|
android:hardwareAccelerated="true"
|
||||||
|
android:windowSoftInputMode="adjustResize">
|
||||||
|
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||||
|
the Android process has started. This theme is visible to the user
|
||||||
|
while the Flutter UI initializes. After that, this theme continues
|
||||||
|
to determine the Window background behind the Flutter UI. -->
|
||||||
|
<meta-data
|
||||||
|
android:name="io.flutter.embedding.android.NormalTheme"
|
||||||
|
android:resource="@style/NormalTheme"
|
||||||
|
/>
|
||||||
|
<!-- Displays an Android View that continues showing the launch screen
|
||||||
|
Drawable until Flutter paints its first frame, then this splash
|
||||||
|
screen fades out. A splash screen is useful to avoid any visual
|
||||||
|
gap between the end of Android's launch screen and the painting of
|
||||||
|
Flutter's first frame. -->
|
||||||
|
<meta-data
|
||||||
|
android:name="io.flutter.embedding.android.SplashScreenDrawable"
|
||||||
|
android:resource="@drawable/launch_background"
|
||||||
|
/>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN"/>
|
||||||
|
<category android:name="android.intent.category.LAUNCHER"/>
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
<!-- Don't delete the meta-data below.
|
||||||
|
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||||
|
<meta-data
|
||||||
|
android:name="flutterEmbedding"
|
||||||
|
android:value="2" />
|
||||||
|
</application>
|
||||||
|
</manifest>
|
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Modify this file to customize your launch splash screen -->
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="@android:color/white" />
|
||||||
|
|
||||||
|
<!-- You can insert your own image assets here -->
|
||||||
|
<!-- <item>
|
||||||
|
<bitmap
|
||||||
|
android:gravity="center"
|
||||||
|
android:src="@mipmap/launch_image" />
|
||||||
|
</item> -->
|
||||||
|
</layer-list>
|
After Width: | Height: | Size: 544 B |
After Width: | Height: | Size: 442 B |
After Width: | Height: | Size: 721 B |