Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Lakshyasukhralia authored Jul 25, 2023
0 parents commit c0b8e37
Show file tree
Hide file tree
Showing 171 changed files with 10,047 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "weekly"
221 changes: 221 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
name: Build

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

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

jobs:
build_android:
name: Build android
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Retrieve the keystore and decode it to a file
env:
ANDROID_RELEASE_KEYSTORE_FILE: ${{ secrets.ANDROID_RELEASE_KEYSTORE_FILE }}
run: |
mkdir keys
echo $ANDROID_RELEASE_KEYSTORE_FILE | base64 --decode > keys/release.keystore
- name: Write local.properties
env:
ANDROID_RELEASE_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}
ANDROID_RELEASE_KEY_ALIAS: ${{ secrets.ANDROID_RELEASE_KEY_ALIAS }}
ANDROID_RELEASE_KEY_PASSWORD: ${{ secrets.ANDROID_RELEASE_KEY_PASSWORD }}
NYT_API_KEY: ${{ secrets.NYT_API_KEY }}
run: |
echo androidReleaseStoreFile=../../keys/release.keystore >> local.properties
echo androidReleaseStorePassword=$ANDROID_RELEASE_KEYSTORE_PASSWORD >> local.properties
echo androidReleaseKeyAlias=$ANDROID_RELEASE_KEY_ALIAS >> local.properties
echo androidReleaseKeyPassword=$ANDROID_RELEASE_KEY_PASSWORD >> local.properties
echo apiKey=$NYT_API_KEY >> local.properties
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew :app:android:assemble

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: android
path: |
app/android/build/outputs/apk/debug/android-debug.apk
app/android/build/outputs/apk/release/android-release.apk
app/android/build/outputs/mapping/release/mapping.txt
build_desktop:
strategy:
matrix:
config: [
{ target: apple, os: macos-latest, task: packageDmg },
{ target: windows, os: windows-latest, task: packageMsi },
{ target: linux, os: ubuntu-latest, task: packageDeb },
]
runs-on: ${{ matrix.config.os }}
name: Build ${{ matrix.config.target }}

steps:
- uses: actions/checkout@v3

- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Write local.properties
env:
NYT_API_KEY: ${{ secrets.NYT_API_KEY }}
run: |
echo apiKey=$NYT_API_KEY >> local.properties
shell: bash

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew :app:desktop:${{ matrix.config.task }}

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: desktop-${{ matrix.config.target }}
path: |
app/desktop/build/compose/binaries/main/
build_ios:
name: Build iOS
runs-on: macos-latest

steps:
- uses: actions/checkout@v3

- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Setup Cocoapods
uses: maxim-lobanov/setup-cocoapods@v1
with:
podfile-path: app/ios/Podfile.lock

- name: Build with xcode
continue-on-error: true # TODO: Fix the certificates
run: |
cd app/ios
pod install
xcodebuild -workspace ios.xcworkspace -scheme ios
build_web:
runs-on: ubuntu-latest
name: Build web

steps:
- uses: actions/checkout@v3

- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Write local.properties
env:
NYT_API_KEY: ${{ secrets.NYT_API_KEY }}
run: |
echo apiKey=$NYT_API_KEY >> local.properties
shell: bash

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew :app:web:jsBrowserDistribution

- name: Upload pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: ${{ github.workspace }}/app/web/build/distributions

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

build_wear:
name: Build wear os
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Retrieve the keystore and decode it to a file
env:
ANDROID_RELEASE_KEYSTORE_FILE: ${{ secrets.ANDROID_RELEASE_KEYSTORE_FILE }}
run: |
mkdir keys
echo $ANDROID_RELEASE_KEYSTORE_FILE | base64 --decode > keys/release.keystore
- name: Write local.properties
env:
ANDROID_RELEASE_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}
ANDROID_RELEASE_KEY_ALIAS: ${{ secrets.ANDROID_RELEASE_KEY_ALIAS }}
ANDROID_RELEASE_KEY_PASSWORD: ${{ secrets.ANDROID_RELEASE_KEY_PASSWORD }}
NYT_API_KEY: ${{ secrets.NYT_API_KEY }}
run: |
echo androidReleaseStoreFile=../../keys/release.keystore >> local.properties
echo androidReleaseStorePassword=$ANDROID_RELEASE_KEYSTORE_PASSWORD >> local.properties
echo androidReleaseKeyAlias=$ANDROID_RELEASE_KEY_ALIAS >> local.properties
echo androidReleaseKeyPassword=$ANDROID_RELEASE_KEY_PASSWORD >> local.properties
echo apiKey=$NYT_API_KEY >> local.properties
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew :app:wear:assemble
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
*.iml
.gradle
.DS_Store
build
captures
.externalNativeBuild
.cxx
local.properties
xcuserdata
/keys/
/app/ios/Pods/

# Idea
**/.idea/*
# Allow code styles and run configurations
!**/.idea/codeStyles
!**/.idea/runConfigurations
!**/.idea/icon.svg
!**/.idea/.name
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

128 changes: 128 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c0b8e37

Please sign in to comment.