Skip to content

Commit

Permalink
[Calendar] Code improvement for calendar app
Browse files Browse the repository at this point in the history
Fix files changed in merge
Remove unneeded code from calendar app
Fixes migrations and build file names

small changes
  • Loading branch information
wrdhub committed Jul 25, 2024
1 parent 4817d02 commit 7d7060a
Show file tree
Hide file tree
Showing 30 changed files with 2,877 additions and 2,994 deletions.
12 changes: 10 additions & 2 deletions app-android/calendar/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,20 @@ android {
val variant = this
variant.outputs.configureEach {
val flavor = variant.productFlavors[0].name
(this as com.android.build.gradle.internal.api.BaseVariantOutputImpl).outputFileName = "tutanota-calendar-$flavor-${variant.buildType.name}-${variant.versionName}.apk"
// The cast is needed because outputFileName isn't directly accessible in .kts files
// And the outputFile.renameTo function runs at the beginning of the build process
// which will make the build script try to move a file that doesn't exist (yet)
(this as com.android.build.gradle.internal.api.BaseVariantOutputImpl).outputFileName =
"calendar-$flavor-${variant.buildType.name}-${variant.versionName}.apk"
}
}

buildTypes.map {
it.buildConfigField("String", "FILE_PROVIDER_AUTHORITY", "\"" + it.manifestPlaceholders["contentProviderAuthority"] + "\"")
it.buildConfigField(
"String",
"FILE_PROVIDER_AUTHORITY",
"\"" + it.manifestPlaceholders["contentProviderAuthority"] + "\""
)
// keep in sync with src/native/main/NativePushServiceApp.ts
it.buildConfigField("String", "SYS_MODEL_VERSION", "\"99\"")
it.buildConfigField("String", "TUTANOTA_MODEL_VERSION", "\"71\"")
Expand Down
8 changes: 4 additions & 4 deletions ci/Android-Calendar.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pipeline {
]) {
sh 'node android.js -b releaseTest test -a calendar'
}
stash includes: "build/app-android/tutanota-calendar-tutao-releaseTest-${VERSION}.apk", name: 'apk-testing'
stash includes: "build/app-android/calendar-tutao-releaseTest-${VERSION}.apk", name: 'apk-testing'
}
} // stage testing
stage('Production') {
Expand Down Expand Up @@ -92,7 +92,7 @@ pipeline {
]) {
sh 'node android.js -b release prod -a calendar'
}
stash includes: "build/app-android/tutanota-calendar-tutao-release-${VERSION}.apk", name: 'apk-production'
stash includes: "build/app-android/calendar-tutao-release-${VERSION}.apk", name: 'apk-production'
}
} // stage production
}
Expand All @@ -113,7 +113,7 @@ pipeline {
groupId: "app",
artifactId: "calendar-android-test",
version: "${VERSION}",
assetFilePath: "${WORKSPACE}/build/app-android/tutanota-calendar-tutao-releaseTest-${VERSION}.apk",
assetFilePath: "${WORKSPACE}/build/app-android/calendar-tutao-releaseTest-${VERSION}.apk",
fileExtension: 'apk'
)
}
Expand All @@ -125,7 +125,7 @@ pipeline {
unstash 'apk-production'

script {
def filePath = "build/app-android/tutanota-calendar-tutao-release-${VERSION}.apk"
def filePath = "build/app-android/calendar-tutao-release-${VERSION}.apk"
def util = load "ci/jenkins-lib/util.groovy"

util.publishToNexus(
Expand Down
Loading

0 comments on commit 7d7060a

Please sign in to comment.