Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version update template #37

Open
wants to merge 79 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
6bc301c
Removed the android play services config from git history and added f…
r0adkll Apr 22, 2020
15a0859
Re-enabled analytics
r0adkll Apr 23, 2020
d84add4
Updated README.md
r0adkll Apr 23, 2020
9be58c3
Started push message integrating
r0adkll Apr 24, 2020
f8d5442
Updated downvotes structure to match server
r0adkll Apr 24, 2020
55674f1
Finished handling push notification clicks.
r0adkll Apr 24, 2020
4789ab1
Fixed #11 - Player list can now scroll to the top of the screenˆ
r0adkll Apr 24, 2020
7ff1896
Fixed #7 - Removed visual duplicates from game id character pool to m…
r0adkll Apr 24, 2020
0106042
Added release notes for next build
r0adkll Apr 24, 2020
0520343
Create CI.yml
r0adkll Apr 24, 2020
bf07a39
Merge remote-tracking branch 'origin/master'
r0adkll Apr 24, 2020
e8863b3
Merging ci workflow
r0adkll Apr 24, 2020
3ab05ba
Adding dart container to CI jobs
r0adkll Apr 24, 2020
51d6668
Fixed #1 - Finished adding Dynamic Links
r0adkll Apr 25, 2020
e5f4ea1
Fixed #13 - Improved the look and feel of the 'New Game' interface
r0adkll Apr 26, 2020
423ae7c
Attempting to fix CI workflow
r0adkll Apr 26, 2020
4dbe90f
Attempting to fix dependencies
r0adkll Apr 26, 2020
15aa998
#14 - Adjusting theme and coloring (working on a fully dark mode)
r0adkll Apr 27, 2020
ab0ec93
minor refactoring of pubspecˆ
r0adkll Apr 27, 2020
ddb8fa7
updated release notes for next version
r0adkll Apr 27, 2020
94b7eba
Resolve #8 - Added profile editor that let's you change your name and…
r0adkll Apr 28, 2020
4358ab5
Added update timestamp when updating user obj
r0adkll Apr 28, 2020
6c83b6f
Preparing for next release
r0adkll Apr 28, 2020
8d46374
Resolve #6 - Added ability to leave a game, and thusly remove it from…
r0adkll Apr 29, 2020
54a4be5
Added loading indication to create game screen
r0adkll Apr 30, 2020
8b0fd6e
Added some iOS configuration so that dynamic links can link into the …
r0adkll Apr 30, 2020
590745f
#14 - Improved DarkMode support
r0adkll May 1, 2020
a79f262
Fix #18 - Joining a game is no case-insensitiveˆ
r0adkll May 5, 2020
66c8624
Fixed #16 - Multi-card responses ordering fixed
r0adkll May 6, 2020
c485225
Added Wiredash feedback integrations into the appˆ
r0adkll May 6, 2020
17def34
#14 - More dark mode theming fixes
r0adkll May 6, 2020
c9fa415
Resolve #12 - Improved the turn winner bottom sheet to be fully scrol…
r0adkll May 7, 2020
f504b7e
Fixed some theme and color issues
r0adkll May 10, 2020
55fd9a2
Preparing for next beta release
r0adkll May 10, 2020
a1668c9
Close #17 - Wired with Firebase Analytics callsˆ
r0adkll May 13, 2020
748db31
Added license attribution for Cards Against Humanity Content
r0adkll May 14, 2020
565c675
Added language to attribution in README.md˚
r0adkll May 14, 2020
2c04c56
Added links to language in README.md
r0adkll May 14, 2020
db5e327
Hide "Developer" packs behind 5-tapping the version #
r0adkll May 15, 2020
1de548e
Preparing for next release
r0adkll May 15, 2020
914df26
Add "Commons Clause" to licence
sonolumin May 15, 2020
3de8af1
Merge pull request #22 from 52inc/licence-ct-commons
r0adkll May 15, 2020
05afc6c
Updated Workflow Scripts for CI/CD flow
r0adkll May 15, 2020
a5b5f8e
Updated android-side dependencies
r0adkll May 15, 2020
ffb8c50
Fixed trigger for beta deployment
r0adkll May 15, 2020
b5a4941
tweaking workflows
r0adkll May 15, 2020
9a9e647
Merge pull request #23 from 52inc/release/1.0.0
r0adkll May 15, 2020
43b45f8
tweaking workflows
r0adkll May 15, 2020
0deba4f
Merge pull request #24 from 52inc/release/1.0.0
r0adkll May 15, 2020
8e8fcfe
Bumped version name for iOS release
r0adkll May 15, 2020
4438e0f
Updated readme to include the card data source (and mirror)
r0adkll May 15, 2020
8bf9498
Update CONTRIBUTING.md
sonolumin May 15, 2020
38cd72c
Merge pull request #25 from 52inc/contr-ct-title_change
r0adkll May 15, 2020
1869615
Fixing formating
sonolumin May 15, 2020
65535bb
Merge pull request #26 from 52inc/licence-ct-format_change
sonolumin May 15, 2020
47a0125
Updated HomeScreen design to be more compliant with Apple App Review
r0adkll Jun 5, 2020
f9f2f7e
Updated CHANGELOG.md
r0adkll Jun 5, 2020
a1c55c8
Bump websocket-extensions from 0.1.3 to 0.1.4 in /importer
dependabot[bot] Jun 8, 2020
04475a5
Merge pull request #28 from 52inc/dependabot/npm_and_yarn/importer/we…
r0adkll Jun 17, 2020
837af5a
Bump lodash from 4.17.15 to 4.17.19 in /importer
dependabot[bot] Jul 20, 2020
795c910
Merge pull request #29 from 52inc/dependabot/npm_and_yarn/importer/lo…
r0adkll Aug 19, 2020
4affc3a
Bump node-fetch from 2.6.0 to 2.6.1 in /importer
dependabot[bot] Sep 12, 2020
9c7dde5
Fixed apple sign-in
r0adkll Jan 16, 2021
f396fb9
Preparing for next update
r0adkll Jan 16, 2021
3523efa
Merge remote-tracking branch 'origin/master'
r0adkll Jan 16, 2021
e4a3fd0
Updates to firestore impl and other upgrades
r0adkll Mar 12, 2021
5dc8269
Fixed most of the issues and got the app to run in the web
r0adkll Mar 12, 2021
6c2d314
Merge pull request #30 from 52inc/dependabot/npm_and_yarn/importer/no…
r0adkll Mar 12, 2021
dc64bff
Fixed some styling issues from web compat fixes
r0adkll Mar 16, 2021
0348037
Merge remote-tracking branch 'origin/main' into main
r0adkll Mar 16, 2021
af89550
Updated workflows to work
r0adkll Mar 16, 2021
5bdb1b2
working on workflow
r0adkll Mar 17, 2021
ae60b56
Working on web optimizations
r0adkll Mar 17, 2021
af1552b
Update README.md
r0adkll Apr 10, 2021
98b3d00
Working on web/tablet optimizations
r0adkll May 14, 2021
09f2d6f
adding locks
r0adkll May 14, 2021
ca278ab
Merge remote-tracking branch 'upstream/main'
r0adkll May 17, 2021
7c149c7
removed web key file from git
r0adkll May 17, 2021
a19435c
Version updates (e.g. dependencies, null safety, etc.) that is more i…
May 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: AppDistribution

# Only deploy a beta to AppDistribution when we are preparing a new release
on:
push:
branches:
- release/**

jobs:
deploy-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '11'

- uses: subosito/flutter-action@master
with:
channel: stable

- name: Fetch dependencies
run: flutter pub get

- name: Run Code Generate
run: ./regenerate.sh

- name: Setup Secrets
run: |
echo $GOOGLE_SERVICES_JSON | tee android/app/google-services.json
echo $CONFIG_DART | tee lib/config.dart
echo $KEY_PROPERTIES | tee android/key.properties
echo $SIGNING_KEY | base64 --decode > android/distribution/aah.jks
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
CONFIG_DART: ${{ secrets.CONFIG_DART }}
KEY_PROPERTIES: ${{ secrets.KEY_PROPERTIES }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}

- name: Build APK
run: flutter build apk

- name: Upload to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1.2.1
with:
appId: ${{secrets.ANDROID_FIREBASE_APP_ID}}
token: ${{secrets.FIREBASE_TOKEN}}
groups: 52inc,friends-&-family
releaseNotesFile: android/distribution/release_notes.txt
file: ${{ env.SIGNED_RELEASE_FILE }}

54 changes: 54 additions & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Play Store

# Only deploy a beta to AppDistribution when we are preparing a new release
on:
push:
tags:
- v**

jobs:
deploy-android:
runs-on: ubuntu-latest
container:
image: google/dart:latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '11'

- uses: subosito/flutter-action@master
with:
channel: stable

- name: Fetch dependencies
run: flutter pub get

- name: Setup Secrets
run: |
echo $GOOGLE_SERVICES_JSON | tee android/app/google-services.json
echo $CONFIG_DART | tee lib/config.dart
echo $KEY_PROPERTIES | tee android/key.properties
echo $SIGNING_KEY | base64 --decode > android/distribution/aah.jks
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
CONFIG_DART: ${{ secrets.CONFIG_DART }}
KEY_PROPERTIES: ${{ secrets.KEY_PROPERTIES }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}

- name: Run Code Generate
run: ./regenerate.sh

- name: Build APK
run: flutter build appbundle

- name: Upload to Google Play Store
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonRaw: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: com.ftinc.appsagainsthumanity
releaseFile: build/app/outputs/bundle/release/app-release.aab
track: production
whatsNewDirectory: distribution/whatsnew


3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
# Misc tools
lib/config.json
lib/config.dart
credentials.json
*.g.dart
web/firebase_config.js

Expand All @@ -49,3 +48,5 @@ app.*.map.json

# Exceptions to above rules.
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

web/firebase-messaging-sw.js
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 1.0.2 - 3/16/2021

* Added ability to wave at players, sending them a push notification. - [@r0adkll](https://github.com/R0ADKLL)

## 1.0.1 - 6/5/2020

* Updated Home/Sign-In screen UI to be more unique and user friendly. - [@r0adkll](https://github.com/R0ADKLL)
* Fixed handling of dynamic links so you can now join games by link. - [@r0adkll](https://github.com/R0ADKLL)

## 1.0.0 - 4/10/2020

* Initial Release. - [@r0adkll](https://github.com/R0ADKLL)
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing to SwitchShare
# Contributing to Apps Against Humanity

## Issues

Expand Down
30 changes: 25 additions & 5 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
“Commons Clause” License Condition v1.0

The Software is provided to you by the Licensor under the License,
as defined below, subject to the following condition.

Without limiting other conditions in the License, the grant of rights
under the License will not include, and the License does not grant to
you, the right to Sell the Software.

For purposes of the foregoing, “Sell” means practicing any or all of the
rights granted to you under the License to provide to third parties, for
a fee or other consideration (including without limitation fees for hosting
or consulting/ support services related to the Software), a product or
service whose value derives, entirely or substantially, from the functionality
of the Software. Any license notice or attribution required by the License
must also include this Commons Clause License Condition notice.

Software: Apps Against Humanity

License: GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007

Licensor: 52inc

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
Expand Down Expand Up @@ -631,8 +651,8 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

DeckBox
Copyright (C) 2018 Drew Heavner
Apps Against Humanity
Copyright (C) 2020 52inc

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -652,7 +672,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

SwitchShare Copyright (C) 2020 52inc
Apps Against Humanity Copyright (C) 2020 52inc
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand Down
71 changes: 70 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Apps Against Humanity - _WIP_
# Apps Against ~Humanity~ Fellowships
_Working title for 'rebrand'. The idea is to shift to a build-your-own-cards kinds of layout where users can create/import their own card sets and share them on a 'marketplace' where you can download any shared cardset. This would allow us to further de-couple the Cards Against Humanity cards and branding to better comply with the app store reviews_

A Flutter Cards Against Humanity app for Android, iOS, and Web

Expand All @@ -10,6 +11,66 @@ Setup a [Firebase Project](https://firebase.com/) with an Android and iOS applic

1. Download the `google-services.json` file for your Android application to `android/app/google-services.json`
2. Download the `GoogleServices-Info.plist` file for your iOS application to `ios/Runner/GoogleServices-Info.plist`
3. Add the following contents to a file named `firebase_config.js` to the `web/` folder

```javascript
// Your web app's Firebase configuration
var firebaseConfig = {
apiKey: "some_api_key",
authDomain: "some_firebase_project_id.firebaseapp.com",
databaseURL: "https://some_firebase_project_id.firebaseio.com",
projectId: "some_firebase_project_id",
storageBucket: "some_firebase_project_id.appspot.com",
messagingSenderId: "00000000000",
appId: "some_web_app_id",
measurementId: "some_analytics_id"
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
firebase.analytics();
```

### Import Card Data
You can find and import all the card data from this [Google Sheet](https://docs.google.com/spreadsheets/d/1lsy7lIwBe-DWOi2PALZPf5DgXHx9MEvKfRw1GaWQkzg/edit) (or the [mirror here](https://docs.google.com/spreadsheets/d/1H808p0SA8zCfU44PG_ZoNi4eBawB2CiQFI7ttVTGRNQ/edit)) using the node.js script located at `/importer`

### Setup Wiredash
Setup an account @ [wiredash.io](https://wiredash.io/) and create a new project to generate a `projectId` and `secret` that you will use in the following config. Or, you can remove the `Wiredash` widget from the `lib/app.dart` widget tree.

### Setup Config

Add your own configuration file to the `/lib` folder. Use this example: `example.config.json`

```json
{
"privacyPolicyUrl": "https://example.com/privacy.html",
"termsOfServiceUrl": "https://example.com/tos.html",
"sourceUrl": "https://github.com/52inc/AppsAgainstHumanity",
"wiredashProjectId": "some_wiredash_projectId",
"wiredashSecret": "some_wiredash_secret"
}
```

Then run

```shell
flutter generate
```

### Generate JSON models

Just run this:

```shell
flutter packages pub run build_runner build --delete-conflicting-outputs
```

### Setup Functions

Fork the repository here: https://github.com/52inc/AppsAgainstHumanity-Firebase and deploy the functions to your firebase project using:

```bash
firebase deploy --only functions
```

# Contributing

Expand All @@ -22,3 +83,11 @@ Please follow the guidelines set forth in the [CONTRIBUTING](CONTRIBUTING.md) do
GNU General Public License v3.0

See [LICENSE](LICENSE) to see the full text.

# Attribution

All [CAH or "Cards Against Humanity"](https://cardsagainsthumanity.com/) question and answer text are hosted externally and are never included in the binary itself for the app that is uploaded to Google Play and Apple's App Store.

All [CAH or "Cards Against Humanity"](https://cardsagainsthumanity.com/) question and answer text are licensed under Creative Commons BY-NC-SA 4.0 by the owner Cards Against Humanity, LLC. This application is NOT official, produced, endorsed or supported by Cards Against Humanity, LLC.

[![CC-BY-NC-SA](assets/cc_by_nc_sa.png)](https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode)
3 changes: 2 additions & 1 deletion android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ gradle-wrapper.jar
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
distribution/*.jks
distribution/aah.jks
key.properties
google-services.json
5 changes: 3 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ flutter {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.firebase:firebase-analytics:17.3.0'
implementation 'com.google.firebase:firebase-crashlytics:17.0.0-beta04'
implementation 'com.google.firebase:firebase-analytics:17.4.1'
implementation 'com.google.firebase:firebase-messaging:20.1.7'
implementation 'com.google.firebase:firebase-crashlytics:17.0.0'
}

apply plugin: 'com.google.gms.google-services'
Expand Down
29 changes: 29 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,40 @@
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="appsagainsthumanity.com"
android:scheme="https" />
</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" />

<!-- Set custom default icon. This is used when no icon is set for incoming notification messages.
See README(https://goo.gl/l4GJaQ) for more. -->
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_notification" />

<!-- Set color used with incoming notification messages. This is used when no color is set for the incoming
notification message. See README(https://goo.gl/6BKBk7) for more. -->
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/colorAccent" />

<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="@string/default_notification_channel_id" />
</application>
</manifest>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorAccent">#AB47BC</color>
</resources>
4 changes: 4 additions & 0 deletions android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="default_notification_channel_id">aah_game_notifications</string>
</resources>
1 change: 1 addition & 0 deletions android/distribution/groups-alpha.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
52inc,friends-&-family
3 changes: 3 additions & 0 deletions android/distribution/release-notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
• Improved disclaimer language in the settings
• Added analytic calls
• Developer packs are now super-secret and require a special action to unlock them
20 changes: 20 additions & 0 deletions appdistribution.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

if [ "$1" == --help ]
then
echo "Usage: ./appdistribution.sh <firebase_ci_token> <groups_file> [--build]"
else

if [[ "$3" == --build ]]
then
flutter clean
flutter build apk
fi

firebase appdistribution:distribute build/app/outputs/apk/release/app-release.apk \
--app 1:100898335413:android:88a8670f87c5c1ea8cacfc \
--token "$1" \
--release-notes-file android/distribution/release-notes.txt \
--groups-file "$2" \

fi
Binary file modified assets/1.5x/rando_cardrissian.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/2.0x/rando_cardrissian.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/3.0x/rando_cardrissian.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/4.0x/rando_cardrissian.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/cc_by_nc_sa.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/rando_cardrissian.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.