generated from xxfast/NYTimes-KMP
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c0b8e37
Showing
171 changed files
with
10,047 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.