Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 28 additions & 42 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,45 +14,31 @@ jobs:
shell: bash

steps:
- uses: actions/checkout@v2
- name: set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'

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

- name: Get Extra files
uses: prewk/s3-cp-action@v1
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'eu-west-1'
SOURCE: 's3://splitbus/gmaps.zip'
DEST: './app/src/main/java/com/am/stbus/presentation/screens'

- name: Unzip extra files
run: |
echo "Poceo unzip"
cd app/src/main/java/com/am/stbus/presentation/screens
ls
unzip gmaps.zip
echo "Gotov unzip"

- name: Add Google services JSON
run: |
cd app
ls
echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > google-services.json
echo "Gotov Google services JSON"

- name: Update gradleProperties
id: createServiceAccount
run: |
echo "first message"
echo '${{ secrets.GRADLE_PROPERTIES }}' > gradle.properties

- name: Build with Gradle
run: ./gradlew buildRelease
- uses: actions/checkout@v3
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Set up Android SDK
uses: android-actions/setup-android@v2

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

- name: Add Google services JSON
run: |
cd app
ls
echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > google-services.json
echo "Gotov Google services JSON"

- name: Update secrets
id: updateSecrets
run: |
echo "Updating Secrets.kt"
echo '${{ secrets.SECRETS }}' > app/src/main/java/com/am/stbus/common/Secrets.kt

- name: Build with Gradle
run: ./gradlew buildRelease
104 changes: 45 additions & 59 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,70 +14,56 @@ jobs:
shell: bash

steps:
- uses: actions/checkout@v2
- name: set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- uses: actions/checkout@v3
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Set up Android SDK
uses: android-actions/setup-android@v2

- name: Get Extra files
uses: prewk/s3-cp-action@v1
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'eu-west-1'
SOURCE: 's3://splitbus/gmaps.zip'
DEST: './app/src/main/java/com/am/stbus/presentation/screens'
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Unzip extra files
run: |
echo "Poceo unzip"
cd app/src/main/java/com/am/stbus/presentation/screens
ls
unzip gmaps.zip
echo "Gotov unzip"
- name: Add Google services JSON
run: |
cd app
ls
echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > google-services.json
echo "Gotov Google services JSON"

- name: Add Google services JSON
run: |
cd app
ls
echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > google-services.json
echo "Gotov Google services JSON"
- name: Update secrets
id: updateSecrets
run: |
echo "Updating Secrets.kt"
echo '${{ secrets.SECRETS }}' > app/src/main/java/com/am/stbus/common/Secrets.kt

- name: Update gradleProperties
id: gradleProperties
run: |
echo "first message"
echo '${{ secrets.GRADLE_PROPERTIES }}' > gradle.properties
- name: Build Release AAB
id: buildRelease
run: ./gradlew bundleRelease

- name: Build Release AAB
id: buildRelease
run: ./gradlew bundleRelease
- name: Sign AAB
id: sign
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/bundle/release
signingKeyBase64: ${{ secrets.KEY_SIGNING }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}

- name: Sign AAB
id: sign
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/bundle/release
signingKeyBase64: ${{ secrets.KEY_SIGNING }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Create service_account.json
id: createServiceAccount
run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json

- name: Create service_account.json
id: createServiceAccount
run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json

- name: Deploy to Play Store (BETA)
id: deploy
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJson: service_account.json
packageName: com.am.stbus
releaseFiles: app/build/outputs/bundle/release/app-release.aab
track: internal
status: completed
- name: Deploy to Play Store (BETA)
id: deploy
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJson: service_account.json
packageName: com.am.stbus
releaseFiles: app/build/outputs/bundle/release/app-release.aab
track: internal
status: completed
100 changes: 36 additions & 64 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,82 +1,54 @@
# Built application files
*.apk
*.ap_

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
.gradle/
build/
**/build/

# Local configuration file (sdk path, etc)
local.properties
Secrets.kt

# Proguard folder generated by Eclipse
proguard/

# Log Files
# Log files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# Intellij
# Android Studio
.idea/
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml

# Keystore files
*.jks

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
*.ipr
*.iws
out/

# Google Services (e.g. APIs or Firebase)
google-services.json
# Kotlin and Java compiled files
*.class
*.jar
*.war
*.ear
*.dex

# Freeline
freeline.py
freeline/
freeline_project_description.json
# Generated files
gen/
bin/
captures/
output.json

# Fastlane
fastlane/
Gemfile
Gemfile.lock
# IntelliJ
*.hprof

# Android
release/
release/res/values/
# Gradle caches and wrapper
!gradle/wrapper/gradle-wrapper.jar

# Podatci za Google Maps
gmaps/
# Signing keys (don’t commit these!)
*.keystore
*.jks

# Gmaps config
gradle.properties
# NDK / CMake / Native build
.externalNativeBuild/
.cxx/

# Changelog generator
changelog.sh
# OS-specific
.DS_Store
Thumbs.db

/.idea/deploymentTargetDropDown.xml
/.idea/kotlinc.xml
# Others
*.apk
*.ap_
*.aab
6 changes: 6 additions & 0 deletions .idea/AndroidProjectSystem.xml

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

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

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

2 changes: 1 addition & 1 deletion .idea/compiler.xml

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

2 changes: 1 addition & 1 deletion .idea/misc.xml

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

17 changes: 17 additions & 0 deletions .idea/runConfigurations.xml

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

Loading