diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..d41a94043c43d58b1c21d58399d4cc5eaf2a2606 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.gif filter=lfs diff=lfs merge=lfs -text diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml new file mode 100644 index 0000000000000000000000000000000000000000..888b58b12990d1c2b35900a01cdd09c6d00621d6 --- /dev/null +++ b/.github/workflows/android-release.yml @@ -0,0 +1,130 @@ +name: Android Release +env: + main_project_module: app +on: + push: + tags: + - '*' + workflow_dispatch: +jobs: + build: + permissions: write-all + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + # Set Current Date As Env Variable + - name: Set current date as env variable + run: | + cd Android + echo "date_today=$(date +'%Y-%m-%d')" >> $GITHUB_ENV + + # Set Repository Name As Env Variable + - name: Set repository name as env variable + run: | + cd Android + echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV + + - name: set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: gradle + + - name: Create file + run: | + cd Android + cat /home/runner/work/RisingPhone/RisingPhone/app/google-services.json | base64 + + - name: Putting data + env: + DATA: ${{ secrets.GOOGLE_SERVICES_JSON }} + run: | + cd Android + echo $DATA > /home/runner/work/RisingPhone/RisingPhone/app/google-services.json + + - name: Grant execute permission for gradlew + run: | + cd Android + chmod +x gradlew + + # Run Tests Build + - name: Run gradle tests + run: | + cd Android + ./gradlew test + + - name: Build with Gradle + run: | + cd Android + ./gradlew build + + - name: Archive lint results + if: always() + uses: actions/upload-artifact@v3 + with: + name: lint-report + path: app/build/reports/lint-results-debug.html + + # Create APK Debug + - name: Build apk debug project (APK) - ${{ env.main_project_module }} module + run: | + cd Android + ./gradlew assembleDebug + + # Create APK Release + - name: Build apk release project (APK) - ${{ env.main_project_module }} module + run: | + cd Android + ./gradlew assemble + + # Create Bundle AAB Release + # Noted for main module build [main_project_module]:bundleRelease + - name: Build app bundle release (AAB) - ${{ env.main_project_module }} module + run: | + cd Android + ./gradlew ${{ env.main_project_module }}:bundleRelease + + # Upload Artifact Build + # Noted For Output [main_project_module]/build/outputs/apk/debug/ + - name: Upload APK Debug - ${{ env.repository_name }} + uses: actions/upload-artifact@v2 + with: + name: ${{ env.date_today }} - ${{ env.playstore_name }} - ${{ env.repository_name }} - APK(s) debug generated + path: ${{ env.main_project_module }}/build/outputs/apk/debug/ + + # Noted For Output [main_project_module]/build/outputs/apk/release/ + - name: Upload APK Release - ${{ env.repository_name }} + uses: actions/upload-artifact@v2 + with: + name: ${{ env.date_today }} - ${{ env.playstore_name }} - ${{ env.repository_name }} - APK(s) release generated + path: ${{ env.main_project_module }}/build/outputs/apk/release/ + + # Noted For Output [main_project_module]/build/outputs/bundle/release/ + - name: Upload AAB (App Bundle) Release - ${{ env.repository_name }} + uses: actions/upload-artifact@v2 + with: + name: ${{ env.date_today }} - ${{ env.playstore_name }} - ${{ env.repository_name }} - App bundle(s) AAB release generated + path: ${{ env.main_project_module }}/build/outputs/bundle/release/ + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + + - name: Upload Release Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ env.main_project_module }}/build/outputs/apk/debug/app-debug.apk # Update this with the correct APK path + asset_name: app-release-unsigned.apk + asset_content_type: application/vnd.android.package-archive \ No newline at end of file diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml new file mode 100644 index 0000000000000000000000000000000000000000..473dc85676c09216694783ca8576940df0cf2f1d --- /dev/null +++ b/.github/workflows/android.yml @@ -0,0 +1,55 @@ +name: Android CI + +on: + push: + branches: [ "main", "develop" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: gradle + + - name: Create file + run: | + cd Android + cat /home/runner/work/RisingPhone/RisingPhone/app/google-services.json | base64 + + - name: Putting data + env: + DATA: ${{ secrets.GOOGLE_SERVICES_JSON }} + run: | + cd Android + echo $DATA > /home/runner/work/RisingPhone/RisingPhone/app/google-services.json + + - name: Grant execute permission for gradlew + run: | + cd Android + chmod +x gradlew + # Run Tests Build + - name: Run gradle tests + run: | + cd Android + ./gradlew test + + - name: Build with Gradle + run: | + cd Android + ./gradlew build + + - name: Archive lint results + if: always() + uses: actions/upload-artifact@v3 + with: + name: lint-report + path: app/build/reports/lint-results-debug.html \ No newline at end of file diff --git a/.github/workflows/extension_main.yml b/.github/workflows/extension_main.yml new file mode 100644 index 0000000000000000000000000000000000000000..578a511ff4b979566a44f00aa8035870b4adc635 --- /dev/null +++ b/.github/workflows/extension_main.yml @@ -0,0 +1,78 @@ +name: Development + +on: + pull_request: + types: + - opened + - edited + - synchronize + - reopened + workflow_call: + +jobs: + test: + name: Test application + runs-on: ubuntu-22.04 + timeout-minutes: 10 + steps: + - name: "☁️ checkout repository" + uses: actions/checkout@v2 + + - name: "🔧 setup node" + uses: actions/setup-node@v2.1.5 + with: + node-version: 16 + + - name: "🔧 install npm@latest" + run: | + cd Extension + npm i -g npm@latest + + - name: "📦 install dependencies" + uses: bahmutov/npm-install@v1 + + - name: "🔍 run tests" + run: | + cd Extension + npm run test --if-present + + lint: + name: Code standards + runs-on: ubuntu-22.04 + timeout-minutes: 10 + steps: + - name: "☁️ checkout repository" + uses: actions/checkout@v2 + + - name: "🔧 setup node" + uses: actions/setup-node@v2.1.5 + with: + node-version: 16 + + - name: "🔧 install npm@latest" + run: | + cd Extension + npm i -g npm@latest + + - name: "📦 install dependencies" + uses: bahmutov/npm-install@v1 + + - name: "🔍 lint code" + run: | + cd Extension + npm run lint --if-present + + build: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: | + cd Extension + npm ci + - run: | + cd Extension + npm run build \ No newline at end of file diff --git a/Android/.gitignore b/Android/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..268d2a20dac97cb49f7d421ecdb1e1574b9b7db2 --- /dev/null +++ b/Android/.gitignore @@ -0,0 +1,17 @@ +*.iml +.gradle +/local.properties +/.idea +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties +/app/google-services.json diff --git a/Android/README.md b/Android/README.md new file mode 100644 index 0000000000000000000000000000000000000000..f37eb5fb1e78005c1649007332473f2ef20f50ec --- /dev/null +++ b/Android/README.md @@ -0,0 +1,48 @@ +# RisingAndroid +[](https://github.com/ttt246/RisingPhone/actions/workflows/android.yml) +[](https://github.com/ttt246/RisingPhone/actions/workflows/android.yml) + +All complex software including operating systems will need to be rewritten from the ground up to take advantage of machine learning. In our OS, a AI will manage all apps via plugins, which can be prompted by the user. Our plugins can run as an openai plugin, or in our backend. + +### RisingPhone + +
+
+