Skip to content

Commit

Permalink
Merge pull request #216 from lihenggui/mercury
Browse files Browse the repository at this point in the history
Upgrade to Kotlin 1.9.0
  • Loading branch information
lihenggui authored Jul 7, 2023
2 parents 7ad01f6 + 9966f4a commit d1b6038
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 34 deletions.
63 changes: 35 additions & 28 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,44 @@ jobs:
- name: Build app
run: ./gradlew :app-compose:assembleRelease :app-compose:bundleRelease

- name: Upload built Foss apk
- name: Set apk path
id: apk-path
run: |
foss_path=$(find **/build/outputs/apk/foss -name '*.apk' -type f | head -1)
echo "foss_path=$foss_path" >> $GITHUB_OUTPUT
market_path=$(find **/build/outputs/apk/market -name '*.apk' -type f | head -1)
echo "market_path=$market_path" >> $GITHUB_OUTPUT
- name: Get apk info
id: apk-info
uses: zhaobozhen/apk-info-action@1.1.2
with:
apk-path: ${{ steps.apk-path.outputs.foss_path }}

- name: Build Changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v4.0.0-b02
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}

- name: Write whats new info
run: |
mkdir -p distribution/whatsnew/whatsnew-en-US/
echo '${{ steps.build_changelog.outputs.changelog }}' >> distribution/whatsnew/whatsnew-en-US/whats_new.txt
- name: Upload built Market apk
if: success()
uses: actions/upload-artifact@v3
with:
name: app-compose-foss-release.apk
path: ${{ github.workspace }}/app-compose/build/outputs/apk/foss/app-compose-foss-release.apk
name: Blocker-${{ steps.apk-info.outputs.version-code }}-Market-release.apk
path: ${{ steps.apk-path.outputs.market_path }}

- name: Upload built Market apk
- name: Upload built Foss apk
if: success()
uses: actions/upload-artifact@v3
with:
name: app-compose-market-release.apk
path: ${{ github.workspace }}/app-compose/build/outputs/apk/market/release/app-compose-market-release.apk
name: Blocker-${{ steps.apk-info.outputs.version-code }}-FOSS-release.apk
path: ${{ steps.apk-path.outputs.foss_path }}

- name: Upload mappings
if: success()
Expand All @@ -68,7 +93,7 @@ jobs:
name: mappings
path: "app-compose/build/outputs/mapping/marketRelease"

- name: Publish to Play Store internal test track
- name: Publish to Play Store open beta track
uses: r0adkll/upload-google-play@v1.1.1
with:
serviceAccountJsonPlainText: ${{ secrets.ANDROID_SERVICE_ACCOUNT_JSON }}
Expand All @@ -77,26 +102,7 @@ jobs:
track: beta
inAppUpdatePriority: 2
mappingFile: app-compose/build/outputs/mapping/marketRelease/mapping.txt

- name: Set apk path
id: apk-path
run: |
foss_path=$(find **/build/outputs/apk/foss -name '*.apk' -type f | head -1)
echo "foss_path=$foss_path" >> $GITHUB_OUTPUT
market_path=$(find **/build/outputs/apk/market -name '*.apk' -type f | head -1)
echo "market_path=$market_path" >> $GITHUB_OUTPUT
- name: Get apk info
id: apk-info
uses: zhaobozhen/apk-info-action@1.1.2
with:
apk-path: ${{ steps.apk-path.outputs.foss_path }}

- name: Build Changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v4.0.0-b02
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
whatsNewDirectory: distribution/whatsnew

- name: Create Release
id: create_release
Expand All @@ -105,9 +111,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: true
append_body: true
generate_release_notes: true
body: |
${{steps.build_changelog.outputs.changelog}}
${{ steps.apk-info.outputs.result }}
Expand Down
11 changes: 11 additions & 0 deletions core/datastore/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ protobuf {
}
}

/**
* Add protobuf generated sources to the sourceSets, fixes the following error:
* `InjectProcessingStep was unable to process 'BlockerPreferencesDataSource(androidx.datastore.core.DataStore<UserPreferences>)' because 'UserPreferences' could not be resolved.`
*/
androidComponents.beforeVariants {
android.sourceSets.register(it.name) {
java.srcDir(buildDir.resolve("generated/source/proto/${it.name}/java"))
kotlin.srcDir(buildDir.resolve("generated/source/proto/${it.name}/kotlin"))
}
}

dependencies {
implementation(projects.core.common)
implementation(projects.core.model)
Expand Down
12 changes: 6 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[versions]
accompanist = "0.30.1"
androidDesugarJdkLibs = "2.0.3"
androidGradlePlugin = "8.2.0-alpha10"
androidGradlePlugin = "8.2.0-alpha11"
androidxActivity = "1.7.2"
androidxAppCompat = "1.6.1"
androidxBrowser = "1.5.0"
androidxComposeBom = "2023.06.01"
androidxComposeCompiler = "1.4.8-dev-k1.8.22-badc51991ec"
androidxComposeCompiler = "1.5.0-dev-k1.9.0-6a60475e07f"
androidxComposeMaterial3 = "1.2.0-alpha03"
androidxComposeRuntimeTracing = "1.0.0-alpha03"
androidxCore = "1.10.1"
Expand Down Expand Up @@ -41,15 +41,15 @@ hilt = "2.46.1"
hiltExt = "1.0.0"
jacoco = "0.8.7"
junit4 = "4.13.2"
kotlin = "1.8.22"
kotlin = "1.9.0"
kotlinxCoroutines = "1.7.2"
kotlinxDatetime = "0.4.0"
kotlinxSerializationJson = "1.5.1"
ksp = "1.8.22-1.0.11"
ksp = "1.9.0-1.0.11"
libsu = "5.1.0"
lint = "31.0.2"
okhttp = "4.11.0"
protobuf = "3.23.2"
protobuf = "3.23.4"
protobufPlugin = "0.9.3"
retrofit = "2.9.0"
retrofitKotlinxSerializationJson = "1.0.0"
Expand Down Expand Up @@ -170,4 +170,4 @@ kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
protobuf = { id = "com.google.protobuf", version.ref = "protobufPlugin" }
secrets = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "secrets" }
secrets = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "secrets" }

0 comments on commit d1b6038

Please sign in to comment.