Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
PeculiarProgrammer committed Dec 15, 2024
0 parents commit 39373b5
Show file tree
Hide file tree
Showing 133 changed files with 96,181 additions and 0 deletions.
186 changes: 186 additions & 0 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
name: Flutter CI

on:
push:
branches: ["master"]
pull_request:
branches: ["master"]

jobs:
flutter_test:
name: Flutter Test

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: "3.16.7"

- name: Install dependencies
run: flutter pub get

- name: Verify formatting
run: dart format --output=none --set-exit-if-changed .

- name: Analyze project source
run: dart analyze

# Uncomment the following lines when tests are implemented
# - name: Run tests
# run: flutter test

build_iOSApp:
name: Build Flutter App (iOS)

needs: [flutter_test]

runs-on: macos-latest

steps:
- uses: actions/checkout@v3

- uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: "3.16.7"

- run: flutter pub get

- run: flutter clean

- run: |
flutter build ios --no-codesign
cd build/ios/iphoneos
mkdir Payload
cd Payload
ln -s ../Runner.app
cd ..
zip -r ios-app.ipa Payload
- name: Upload iOS artifact
uses: actions/upload-artifact@v3
with:
name: ios-app
path: build/ios/iphoneos/ios-app.ipa


build_androidApk:
name: Build Flutter App (Android)

needs: [flutter_test]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "17"

- uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: "3.16.7"

- run: flutter pub get

- run: flutter clean

- run: flutter build apk

- name: Upload Android artifact
uses: actions/upload-artifact@v3
with:
name: android-apk
path: build/app/outputs/flutter-apk/*.apk

build_windowsExe:
name: Build Flutter App (Windows)

needs: [flutter_test]

runs-on: windows-latest

steps:
- uses: actions/checkout@v3

- uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: "3.16.7"

- run: flutter pub get

- run: flutter clean

- run: flutter build windows

- run: |
cd build\windows\x64\runner\Release\
powershell Compress-Archive -Path * -DestinationPath windows-app.zip
- name: Upload Windows artifact
uses: actions/upload-artifact@v3
with:
name: windows-exe
path: build/windows/x64/runner/Release/windows-app.zip



release:
name: Create Release

needs: [build_iOSApp, build_androidApk, build_windowsExe]

runs-on: ubuntu-latest

if: github.event_name == 'push'

steps:
- uses: actions/checkout@v3

- name: Download iOS artifact
uses: actions/download-artifact@v3
with:
name: ios-app
path: ./ios

- name: Download Android artifact
uses: actions/download-artifact@v3
with:
name: android-apk
path: ./android

- name: Download Windows artifact
uses: actions/download-artifact@v3
with:
name: windows-exe
path: ./windows

- name: Extract version from pubspec.yaml
id: extract_version
run: |
echo "VERSION=$(grep '^version:' pubspec.yaml | sed 's/version: //')" >> $GITHUB_ENV
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: |
./ios/ios-app.ipa
./android/*.apk
./windows/windows-app.zip
tag: v${{ env.VERSION }}+unreleased
token: ${{ secrets.TOKEN }}
allowUpdates: true
replacesArtifacts: true
body: |
Release v${{ env.VERSION }}+unreleased
- iOS (unsigned)
- Android
- Windows
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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
45 changes: 45 additions & 0 deletions .metadata
Original file line number Diff line number Diff line change
@@ -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: "ef1af02aead6fe2414f3aafa5a61087b610e1332"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332
base_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332
- platform: android
create_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332
base_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332
- platform: ios
create_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332
base_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332
- platform: linux
create_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332
base_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332
- platform: macos
create_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332
base_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332
- platform: web
create_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332
base_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332
- platform: windows
create_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332
base_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332

# 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'
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cSpell.words": [
"ghos"
]
}
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Ghost AI

A Flutter app that solves the game Ghost through the power of combinatorics.

Note: Although this is advertised as AI, it is not. It's simply a semi-optimized brute force algorithm with a nice interface.

## TODO

- [ ] Enhance frequency algorithm
- [ ] Make the app functional on wearable devices to improve ease-of-use
- [ ] Add more dictionary options
- [ ] Implement tests

If you can think of any more, please leave an issue.
28 changes: 28 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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.dev/lints.
#
# 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
13 changes: 13 additions & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
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
Loading

0 comments on commit 39373b5

Please sign in to comment.