From ae2a697e0134eeec269b2f15a2fca2489422c16b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Borcz?= Date: Sun, 18 Apr 2021 19:34:32 +0200 Subject: [PATCH 1/3] Merge pull request #1295 from wulkanowy/rbo/update-workflow Update github action workflow --- .github/workflows/deploy-store.yml | 75 +++++++++++++ .github/workflows/deploy-test.yml | 144 ++++++++++++++++++++++++ .github/workflows/test.yml | 174 +---------------------------- app/bitrise.jks | Bin 2235 -> 0 bytes app/build.gradle | 12 ++ build.gradle | 1 + 6 files changed, 235 insertions(+), 171 deletions(-) create mode 100644 .github/workflows/deploy-store.yml create mode 100644 .github/workflows/deploy-test.yml delete mode 100644 app/bitrise.jks diff --git a/.github/workflows/deploy-store.yml b/.github/workflows/deploy-store.yml new file mode 100644 index 000000000..3cd08e048 --- /dev/null +++ b/.github/workflows/deploy-store.yml @@ -0,0 +1,75 @@ +name: Deploy to app stores + +on: + release: + types: [ created ] + +jobs: + + deploy-google-play: + name: Deploy to google play + runs-on: ubuntu-latest + timeout-minutes: 10 + environment: google-play + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 11 + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }} + - name: Decrypt keys + env: + ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }} + SERVICES_ENCRYPT_KEY: ${{ secrets.SERVICES_ENCRYPT_KEY }} + run: | + gpg --yes --batch --passphrase=$SERVICES_ENCRYPT_KEY ./app/src/release/google-services.json.gpg + gpg --yes --batch --passphrase=$ENCRYPT_KEY ./app/key.p12.gpg + gpg --yes --batch --passphrase=$ENCRYPT_KEY ./app/upload-key.jks.gpg + - name: Upload apk to google play + env: + PLAY_KEY_ALIAS: ${{ secrets.PLAY_KEY_ALIAS }} + PLAY_KEY_PASSWORD: ${{ secrets.PLAY_KEY_PASSWORD }} + PLAY_SERVICE_ACCOUNT_EMAIL: ${{ secrets.PLAY_SERVICE_ACCOUNT_EMAIL }} + PLAY_STORE_PASSWORD: ${{ secrets.PLAY_STORE_PASSWORD }} + run: ./gradlew publishPlayRelease -PenableFirebase --stacktrace; + + deploy-app-gallery: + name: Deploy to AppGallery + runs-on: ubuntu-latest + timeout-minutes: 10 + environment: app-gallery + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 11 + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }} + - name: Decrypt keys + env: + ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }} + SERVICES_ENCRYPT_KEY: ${{ secrets.SERVICES_ENCRYPT_KEY }} + run: | + gpg --yes --batch --passphrase=$SERVICES_ENCRYPT_KEY ./app/src/release/agconnect-services.json.gpg + gpg --yes --batch --passphrase=$ENCRYPT_KEY ./app/key.p12.gpg + gpg --yes --batch --passphrase=$ENCRYPT_KEY ./app/upload-key.jks.gpg + - name: Build HMS version + env: + PLAY_KEY_ALIAS: ${{ secrets.PLAY_KEY_ALIAS }} + PLAY_KEY_PASSWORD: ${{ secrets.PLAY_KEY_PASSWORD }} + PLAY_STORE_PASSWORD: ${{ secrets.PLAY_STORE_PASSWORD }} + run: ./gradlew assembleHmsRelease --stacktrace + - name: Upload APK to AppGallery + env: + AGC_CLIENT_ID: ${{ secrets.AGC_CLIENT_ID }} + AGC_CLIENT_SECRET: ${{ secrets.AGC_CLIENT_SECRET }} + run: ./gradlew publishHuaweiAppGalleryHmsRelease --stacktrace; diff --git a/.github/workflows/deploy-test.yml b/.github/workflows/deploy-test.yml new file mode 100644 index 000000000..88edca05d --- /dev/null +++ b/.github/workflows/deploy-test.yml @@ -0,0 +1,144 @@ +name: Deploy to app tests + +on: + push: +# branches: [ develop ] + branches: [ '!*' ] + pull_request_target: +# branches: [ develop ] + branches: [ '!*' ] + + workflow_dispatch: + +jobs: + + deploy-appcenter: + name: App Center + runs-on: ubuntu-latest + timeout-minutes: 10 + environment: app-center + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 11 + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }} + - name: Set run number with offset + env: + BUILD_NUMBER_OFFSET: ${{ secrets.BUILD_NUMBER_OFFSET }} + run: echo "RUN_NUMBER=$((GITHUB_RUN_NUMBER+BUILD_NUMBER_OFFSET))" >> $GITHUB_ENV + - name: Prepare build configuration + run: | + sed -i -e "s#applicationIdSuffix \".dev\"#applicationIdSuffix \".${GITHUB_HEAD_REF//[-.\/]/_}\"#" app/build.gradle + sed -i -e "s#.dev\"#.${GITHUB_HEAD_REF//[-.\/]/_}\"#" app/src/debug/google-services.json + sed -i -e "s#.dev\"#.${GITHUB_HEAD_REF//[-.\/]/_}\"#" app/src/debug/agconnect-services.json + sed -i -e '/versionNameSuffix/d' app/build.gradle + - name: Add signing config + run: | + cat >> app/build.gradle <> $GITHUB_ENV + - name: Add signing config + run: | + cat >> app/build.gradle <> $GITHUB_ENV - - name: Prepare build configuration - run: | - sed -i -e "s#applicationIdSuffix \".dev\"#applicationIdSuffix \".${GITHUB_HEAD_REF//[-.\/]/_}\"#" app/build.gradle - sed -i -e "s#.dev\"#.${GITHUB_HEAD_REF//[-.\/]/_}\"#" app/src/debug/google-services.json - sed -i -e "s#.dev\"#.${GITHUB_HEAD_REF//[-.\/]/_}\"#" app/src/debug/agconnect-services.json - sed -i -e '/versionNameSuffix/d' app/build.gradle - - name: Add signing config - run: | - cat >> app/build.gradle <> $GITHUB_ENV - - name: Add signing config - run: | - cat >> app/build.gradle <|>OrkVM({XJB2r_xf|zEx)1th{ z%IJp?B$NIOEia$u?&SS%8)*@`A5{K=BIU}&)n10q6DZ4w z&3gjkYM9Z7^hn0pL==pfn;((9#2hJ)1A;HfRmS(32RjR0R$M>cx*n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4,7 @@ apply plugin: 'kotlin-kapt' apply plugin: 'dagger.hilt.android.plugin' apply plugin: 'com.google.firebase.crashlytics' apply plugin: 'com.github.triplet.play' +apply plugin: 'ru.cian.huawei-publish' apply plugin: 'com.mikepenz.aboutlibraries.plugin' apply plugin: 'com.google.gms.google-services' apply plugin: 'com.huawei.agconnect' @@ -140,6 +141,17 @@ play { updatePriority = 3 } +huaweiPublish { + instances { + hmsRelease { + clientId = System.getenv("AGC_CLIENT_ID") + clientSecret = System.getenv("AGC_CLIENT_SECRET") + buildFormat = "apk" + deployType = "draft" + } + } +} + ext { work_manager = "2.5.0" work_hilt = "1.0.0-beta01" diff --git a/build.gradle b/build.gradle index 21ae47e7e..222ea1779 100644 --- a/build.gradle +++ b/build.gradle @@ -19,6 +19,7 @@ buildscript { classpath 'com.huawei.agconnect:agcp:1.5.1.200' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.5.1' classpath "com.github.triplet.gradle:play-publisher:2.8.0" + classpath "ru.cian:huawei-publish-gradle-plugin:1.2.2" classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.1.1" classpath "gradle.plugin.com.star-zero.gradle:githook:1.2.0" classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:$about_libraries" From 43e95cfdc694948a38a298678c57a8c58263fab9 Mon Sep 17 00:00:00 2001 From: Faierbel Date: Thu, 15 Apr 2021 00:29:15 +0200 Subject: [PATCH 2/3] Fix all year average --- .../ui/modules/grade/GradeAverageProvider.kt | 36 +++---- .../ui/modules/grade/GradeSubject.kt | 3 +- .../modules/grade/GradeAverageProviderTest.kt | 96 +++++++++++++++++-- 3 files changed, 107 insertions(+), 28 deletions(-) diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/GradeAverageProvider.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/GradeAverageProvider.kt index 7e9b56b94..d83b1490c 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/GradeAverageProvider.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/GradeAverageProvider.kt @@ -68,7 +68,7 @@ class GradeAverageProvider @Inject constructor( forceRefresh: Boolean, averageMode: GradeAverageMode ): Flow>> { - val gradeAverageForceCalc = preferencesRepository.gradeAverageForceCalc + val isGradeAverageForceCalc = preferencesRepository.gradeAverageForceCalc val selectedSemester = semesters.single { it.semesterId == semesterId } val firstSemester = semesters.single { it.diaryId == selectedSemester.diaryId && it.semesterName == 1 } @@ -78,8 +78,7 @@ class GradeAverageProvider @Inject constructor( if (selectedSemester == firstSemester) return selectedSemesterGradeSubjects - val firstSemesterGradeSubjects = - getGradeSubjects(student, firstSemester, forceRefresh) + val firstSemesterGradeSubjects = getGradeSubjects(student, firstSemester, forceRefresh) return selectedSemesterGradeSubjects.combine(firstSemesterGradeSubjects) { secondSemesterGradeSubject, firstSemesterGradeSubject -> if (firstSemesterGradeSubject.status == Status.ERROR) { @@ -87,9 +86,9 @@ class GradeAverageProvider @Inject constructor( } val isAnyVulcanAverageInFirstSemester = - firstSemesterGradeSubject.data.orEmpty().any { it.average != .0 } + firstSemesterGradeSubject.data.orEmpty().any { it.isVulcanAverage } val isAnyVulcanAverageInSecondSemester = - secondSemesterGradeSubject.data.orEmpty().any { it.average != .0 } + secondSemesterGradeSubject.data.orEmpty().any { it.isVulcanAverage } val updatedData = secondSemesterGradeSubject.data?.map { secondSemesterSubject -> val firstSemesterSubject = firstSemesterGradeSubject.data.orEmpty() @@ -99,7 +98,7 @@ class GradeAverageProvider @Inject constructor( calculateAllYearAverage( student = student, isAnyVulcanAverage = isAnyVulcanAverageInFirstSemester || isAnyVulcanAverageInSecondSemester, - gradeAverageForceCalc = gradeAverageForceCalc, + isGradeAverageForceCalc = isGradeAverageForceCalc, secondSemesterSubject = secondSemesterSubject, firstSemesterSubject = firstSemesterSubject ) @@ -107,7 +106,7 @@ class GradeAverageProvider @Inject constructor( calculateBothSemestersAverage( student = student, isAnyVulcanAverage = isAnyVulcanAverageInFirstSemester || isAnyVulcanAverageInSecondSemester, - gradeAverageForceCalc = gradeAverageForceCalc, + isGradeAverageForceCalc = isGradeAverageForceCalc, secondSemesterSubject = secondSemesterSubject, firstSemesterSubject = firstSemesterSubject ) @@ -121,10 +120,10 @@ class GradeAverageProvider @Inject constructor( private fun calculateAllYearAverage( student: Student, isAnyVulcanAverage: Boolean, - gradeAverageForceCalc: Boolean, + isGradeAverageForceCalc: Boolean, secondSemesterSubject: GradeSubject, firstSemesterSubject: GradeSubject? - ) = if (!isAnyVulcanAverage || gradeAverageForceCalc) { + ) = if (!isAnyVulcanAverage || isGradeAverageForceCalc) { val updatedSecondSemesterGrades = secondSemesterSubject.grades.updateModifiers(student) val updatedFirstSemesterGrades = @@ -138,13 +137,13 @@ class GradeAverageProvider @Inject constructor( private fun calculateBothSemestersAverage( student: Student, isAnyVulcanAverage: Boolean, - gradeAverageForceCalc: Boolean, + isGradeAverageForceCalc: Boolean, secondSemesterSubject: GradeSubject, firstSemesterSubject: GradeSubject? ): Double { val divider = if (secondSemesterSubject.grades.any { it.weightValue > .0 }) 2 else 1 - return if (!isAnyVulcanAverage || gradeAverageForceCalc) { + return if (!isAnyVulcanAverage || isGradeAverageForceCalc) { val secondSemesterAverage = secondSemesterSubject.grades.updateModifiers(student).calcAverage() val firstSemesterAverage = firstSemesterSubject?.grades?.updateModifiers(student) @@ -161,7 +160,7 @@ class GradeAverageProvider @Inject constructor( semester: Semester, forceRefresh: Boolean ): Flow>> { - val gradeAverageForceCalc = preferencesRepository.gradeAverageForceCalc + val isGradeAverageForceCalc = preferencesRepository.gradeAverageForceCalc return gradeRepository.getGrades(student, semester, forceRefresh = forceRefresh) .map { res -> @@ -170,20 +169,21 @@ class GradeAverageProvider @Inject constructor( val allGrades = details.orEmpty().groupBy { it.subject } val items = summaries?.emulateEmptySummaries( - student, - semester, - allGrades.toList(), - isAnyAverage + student = student, + semester = semester, + grades = allGrades.toList(), + calcAverage = isAnyAverage )?.map { summary -> val grades = allGrades[summary.subject].orEmpty() GradeSubject( subject = summary.subject, - average = if (!isAnyAverage || gradeAverageForceCalc) { + average = if (!isAnyAverage || isGradeAverageForceCalc) { grades.updateModifiers(student).calcAverage() } else summary.average, points = summary.pointsSum, summary = summary, - grades = grades + grades = grades, + isVulcanAverage = isAnyAverage ) } diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/GradeSubject.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/GradeSubject.kt index ee4266c5e..57be55ee3 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/GradeSubject.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/GradeSubject.kt @@ -8,5 +8,6 @@ data class GradeSubject( val average: Double, val points: String, val summary: GradeSummary, - val grades: List + val grades: List, + val isVulcanAverage: Boolean ) diff --git a/app/src/test/java/io/github/wulkanowy/ui/modules/grade/GradeAverageProviderTest.kt b/app/src/test/java/io/github/wulkanowy/ui/modules/grade/GradeAverageProviderTest.kt index f3d92d2ee..3878503aa 100644 --- a/app/src/test/java/io/github/wulkanowy/ui/modules/grade/GradeAverageProviderTest.kt +++ b/app/src/test/java/io/github/wulkanowy/ui/modules/grade/GradeAverageProviderTest.kt @@ -440,15 +440,71 @@ class GradeAverageProviderTest { ) } - val items = runBlocking { gradeAverageProvider.getGradesDetailsWithAverage(student, semesters[2].semesterId, true).getResult() } + val items = runBlocking { + gradeAverageProvider.getGradesDetailsWithAverage( + student, + semesters[2].semesterId, + true + ).getResult() + } assertEquals(2, items.size) - assertEquals(3.0, items.single { it.subject == "Matematyka" }.average, .0) // (from details): 3,5 + 2,5 → 3,0 - assertEquals(3.25, items.single { it.subject == "Fizyka" }.average, .0) // (from details): 3,5 + 3,0 → 3,25 + assertEquals( + 3.0, + items.single { it.subject == "Matematyka" }.average, + .0 + ) // (from details): 3,5 + 2,5 → 3,0 + assertEquals( + 3.25, + items.single { it.subject == "Fizyka" }.average, + .0 + ) // (from details): 3,5 + 3,0 → 3,25 } @Test - fun `calc full year average when current is second with load from cache sequence`() { + fun `calc all year average`() { + every { preferencesRepository.gradeAverageMode } returns GradeAverageMode.ALL_YEAR + every { preferencesRepository.gradeAverageForceCalc } returns false + coEvery { + gradeRepository.getGrades( + student, + semesters[1], + true + ) + } returns flowWithResource { + firstGrades to listOf( + getSummary(22, "Matematyka", .0), + getSummary(22, "Fizyka", .0) + ) + } + coEvery { + gradeRepository.getGrades( + student, + semesters[2], + true + ) + } returns flowWithResource { + secondGrades to listOf( + getSummary(22, "Matematyka", .0), + getSummary(22, "Fizyka", .0) + ) + } + + val items = runBlocking { + gradeAverageProvider.getGradesDetailsWithAverage( + student, + semesters[2].semesterId, + true + ).getResult() + } + + assertEquals(2, items.size) + assertEquals(3.0, items.single { it.subject == "Matematyka" }.average, .0) + assertEquals(3.25, items.single { it.subject == "Fizyka" }.average, .0) + } + + @Test + fun `force calc full year average when current is second with load from cache sequence`() { every { preferencesRepository.gradeAverageForceCalc } returns true every { preferencesRepository.gradeAverageMode } returns GradeAverageMode.ALL_YEAR coEvery { semesterRepository.getSemesters(student) } returns semesters @@ -490,17 +546,39 @@ class GradeAverageProviderTest { } @Test - fun `calc both semesters average when no summaries`() { + fun `force calc both semesters average when no summaries`() { every { preferencesRepository.gradeAverageForceCalc } returns true every { preferencesRepository.gradeAverageMode } returns GradeAverageMode.BOTH_SEMESTERS - coEvery { gradeRepository.getGrades(student, semesters[1], true) } returns flowWithResource { firstGrades to emptyList() } - coEvery { gradeRepository.getGrades(student, semesters[2], true) } returns flowWithResource { secondGrades to emptyList() } + coEvery { + gradeRepository.getGrades( + student, + semesters[1], + true + ) + } returns flowWithResource { firstGrades to emptyList() } + coEvery { + gradeRepository.getGrades( + student, + semesters[2], + true + ) + } returns flowWithResource { secondGrades to emptyList() } - val items = runBlocking { gradeAverageProvider.getGradesDetailsWithAverage(student, semesters[2].semesterId, true).getResult() } + val items = runBlocking { + gradeAverageProvider.getGradesDetailsWithAverage( + student, + semesters[2].semesterId, + true + ).getResult() + } assertEquals(2, items.size) - assertEquals(3.0, items.single { it.subject == "Matematyka" }.average, .0) // (from details): 3,5 + 2,5 → 3,0 + assertEquals( + 3.0, + items.single { it.subject == "Matematyka" }.average, + .0 + ) // (from details): 3,5 + 2,5 → 3,0 assertEquals(3.25, items.single { it.subject == "Fizyka" }.average, .0) // (from details): 3,5 + 3,0 → 3,25 } From 8b83b37b096acf13289264033f5481a8068c4e52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Pich?= Date: Sun, 18 Apr 2021 20:38:18 +0200 Subject: [PATCH 3/3] Version 1.1.5 --- app/build.gradle | 8 ++++---- app/src/main/play/release-notes/pl-PL/default.txt | 10 ++-------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 878633055..02a3c90f4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -21,8 +21,8 @@ android { testApplicationId "io.github.tests.wulkanowy" minSdkVersion 17 targetSdkVersion 30 - versionCode 90 - versionName "1.1.4" + versionCode 91 + versionName "1.1.5" multiDexEnabled true testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true @@ -138,7 +138,7 @@ play { serviceAccountCredentials = file('key.p12') defaultToAppBundles = false track = 'production' - updatePriority = 3 + updatePriority = 1 } huaweiPublish { @@ -162,7 +162,7 @@ ext { } dependencies { - implementation "io.github.wulkanowy:sdk:1.1.3" + implementation "io.github.wulkanowy:sdk:1.1.5" coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' diff --git a/app/src/main/play/release-notes/pl-PL/default.txt b/app/src/main/play/release-notes/pl-PL/default.txt index cf014f38c..868c75e3f 100644 --- a/app/src/main/play/release-notes/pl-PL/default.txt +++ b/app/src/main/play/release-notes/pl-PL/default.txt @@ -1,11 +1,5 @@ -Wersja 1.1.4 +Wersja 1.1.5 -Oprócz tego naprawiliśmy: -- rzadkie problemy ze stabilnością przy logowaniu i w innych miejscach -- brakujące awatary przy zmianie konta z poziomu widżetu -- wysyłanie wiadomości gdy w aplikacji jest zalogowany jednocześnie uczeń i rodzic - -Ta wersja jest ostatnią, która będzie działać na starszych urządzeniach z Androidem 4. -Od tej pory do końca roku bedziemy dla nich udostępniać wyłącznie krytyczne poprawki błędów +Naprawiliśmy liczenie średniej wszystkich ocen z całego roku Pełna lista zmian: https://github.com/wulkanowy/wulkanowy/releases