Skip to content

Commit f003379

Browse files
authored
Merge pull request #2527 from kiwix/release/3.4.2
Release/3.4.2
2 parents 2153809 + 7f4dde7 commit f003379

File tree

123 files changed

+2498
-1705
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+2498
-1705
lines changed

.github/workflows/coverage.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
coverageReport:
1616
strategy:
1717
matrix:
18-
api-level: [21, 21]
18+
api-level: [21, 21]
1919
fail-fast: false
2020
runs-on: macOS-latest
2121
steps:
@@ -25,7 +25,7 @@ jobs:
2525
fetch-depth: 1
2626

2727
- name: create instrumentation coverage
28-
uses: ReactiveCircus/android-emulator-runner@v2.8.0
28+
uses: ReactiveCircus/android-emulator-runner@v2.12.0
2929
with:
3030
api-level: ${{ matrix.api-level }}
3131
arch: x86_64
@@ -44,4 +44,12 @@ jobs:
4444

4545
- name: Upload coverage to Codecov
4646
run: |
47-
bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }}
47+
bash <(curl -s https://codecov.io/bash)
48+
49+
- name: Upload Coverage to GH-Actions
50+
uses: actions/[email protected]
51+
if: ${{ always() }}
52+
with:
53+
name: Tests Coverage Report
54+
path: |
55+
**/reports/

.github/workflows/nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
fetch-depth: 1
2222

2323
- name: run instrumentation tests
24-
uses: ReactiveCircus/android-emulator-runner@v2.8.0
24+
uses: ReactiveCircus/android-emulator-runner@v2.12.0
2525
with:
2626
api-level: ${{ matrix.api-level }}
2727
arch: x86_64
@@ -58,7 +58,7 @@ jobs:
5858
chmod 600 ssh_key
5959
6060
- name: Set date variable
61-
run: echo ::set-env name=DATE::$(echo $(date +%Y-%m-%d))
61+
run: echo "DATE=$(echo $(date +%Y-%m-%d))" >> $GITHUB_ENV
6262

6363
- name: release debug to kiwix.download.org
6464
env:

.github/workflows/pull_request.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ jobs:
1616
- name: Static Analysis
1717
run: ./gradlew ktlintCheck detekt app:lintDebug custom:lintCustomexampleDebug
1818

19+
- name: Upload Static Analysis Report
20+
uses: actions/[email protected]
21+
if: ${{ always() }}
22+
with:
23+
name: Static Analysis Report
24+
path: |
25+
**/reports/
26+
27+
1928
build:
2029

2130
runs-on: ubuntu-latest
@@ -27,3 +36,10 @@ jobs:
2736

2837
- name: Build all configurations
2938
run: ./gradlew assemble
39+
40+
- name: Upload APK as Artifacts
41+
uses: actions/[email protected]
42+
with:
43+
name: kiwix-android
44+
path: |
45+
**/*.apk

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
chmod 600 ssh_key
3030
3131
- name: Set tag variable
32-
run: echo ::set-env name=TAG::$(echo ${GITHUB_REF:10})
32+
run: echo "TAG=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV
3333

3434
- name: Publish app to play store
3535
env:

CHANGELOG

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
1+
3.4.2
2+
NEW: Service worker support for war2c zim files
3+
NEW: Updated translations
4+
NEW: Online Library won't be downloaded on mobile data when wifi only preference is set
5+
BUGFIX: Text to Speech continues in background
6+
BUGFIX: Video player became became unresponsive post backgrounding
7+
BUGFIX: Bookmarks/History weren't displaying their title
8+
BUGFIX: Memory leaks patched
9+
BUGFIX: Table of contents accessible from non Reader screens
10+
111
3.4.1
212
NEW: Overhauled navigation
313
NEW: Updated translations
414
NEW: Support resizing Kiwix
5-
NEW: Open search in ne wtab
15+
NEW: Open search in new tab
616
BUGFIX: Search speed increased and loading state added
717
BUGFIX: Memory leaks patched
818
BUGFIX: More consistent labelling drives internal/external

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ To generate coverage reports for your automated tests run:
116116

117117
Code coverage results can be seen under `[module]/build/reports/`
118118

119-
### Continous Integration
119+
### Continuous Integration
120120

121121
All PRs will have all these tests run and a combined coverage report will be attached, if coverage is to go down the PR will be marked failed. On Travis CI the automated tests are run on an emulator. To
122122
learn more about the commands run on the CI please refer to [.github/workflows](https://github.com/kiwix/kiwix-android/tree/develop/.github/workflows).

DESIGN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Text should contrast well, use the correct weight and size to present content as
3939

4040
Views using the same style often use different text style. Therefore text styles, and view styles are seperated and can be used simultaneously. To keep an android application consistent in style, thirteen text style attributes should be defined. These style attributes can be generated ([Material Design type scale generator](https://material.io/design/typography/the-type-system.html#type-scale)), or defined by editing `core/../values/type.xml`.
4141

42-
All text should have a text style to simplifiy appearance changes. To set a text style, simply set the `textAppearance` property using one of the thirteen text style attributes from `core/../values/type.xml`. Text can also be grouped if they are related and uses the same text style. This grouping can be done by creating a style that inherits, or sets a specific text appearance. E.x. `<style name="no_content_text" parent="TextAppearance.KiwixTheme.Headline5" />`.
42+
All text should have a text style to simplify appearance changes. To set a text style, simply set the `textAppearance` property using one of the thirteen text style attributes from `core/../values/type.xml`. Text can also be grouped if they are related and uses the same text style. This grouping can be done by creating a style that inherits, or sets a specific text appearance. E.x. `<style name="no_content_text" parent="TextAppearance.KiwixTheme.Headline5" />`.
4343

4444
Additional reading can be found at [Material Design - Type System](https://material.io/design/typography/the-type-system.html#type-scale).
4545

app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ apply(from = rootProject.file("jacoco.gradle"))
1111
ext {
1212
set("versionMajor", 3)
1313
set("versionMinor", 4)
14-
set("versionPatch", 1)
14+
set("versionPatch", 2)
1515
}
1616

1717
fun generateVersionName() = "${ext["versionMajor"]}.${ext["versionMinor"]}.${ext["versionPatch"]}"

app/detekt_baseline.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
<ID>EmptyFunctionBlock:None.kt$None${ }</ID>
66
<ID>EmptyFunctionBlock:SimplePageChangeListener.kt$SimplePageChangeListener${ }</ID>
77
<ID>LongParameterList:ZimManageViewModel.kt$ZimManageViewModel$( booksOnFileSystem: List&lt;BookOnDisk&gt;, activeDownloads: List&lt;DownloadModel&gt;, allLanguages: List&lt;Language&gt;, libraryNetworkEntity: LibraryNetworkEntity, filter: String, fileSystemState: FileSystemState )</ID>
8-
<ID>LongParameterList:ZimManageViewModel.kt$ZimManageViewModel$( private val downloadDao: FetchDownloadDao, private val bookDao: NewBookDao, private val languageDao: NewLanguagesDao, private val storageObserver: StorageObserver, private val kiwixService: KiwixService, private val context: Application, private val connectivityBroadcastReceiver: ConnectivityBroadcastReceiver, private val bookUtils: BookUtils, private val fat32Checker: Fat32Checker, private val defaultLanguageProvider: DefaultLanguageProvider, private val dataSource: DataSource )</ID>
8+
<ID>LongParameterList:ZimManageViewModel.kt$ZimManageViewModel$( private val downloadDao: FetchDownloadDao, private val bookDao: NewBookDao, private val languageDao: NewLanguagesDao, private val storageObserver: StorageObserver, private val kiwixService: KiwixService, private val context: Application, private val connectivityBroadcastReceiver: ConnectivityBroadcastReceiver, private val bookUtils: BookUtils, private val fat32Checker: Fat32Checker, private val defaultLanguageProvider: DefaultLanguageProvider, private val dataSource: DataSource, private val connectivityManager: ConnectivityManager, private val sharedPreferenceUtil: SharedPreferenceUtil )</ID>
99
<ID>MagicNumber:LibraryListItem.kt$LibraryListItem.LibraryDownloadItem$1000L</ID>
10+
<ID>MagicNumber:PeerGroupHandshake.kt$PeerGroupHandshake$15000</ID>
1011
<ID>MagicNumber:ShareFiles.kt$ShareFiles$24</ID>
1112
<ID>MagicNumber:ZimManageViewModel.kt$ZimManageViewModel$5</ID>
1213
<ID>MagicNumber:ZimManageViewModel.kt$ZimManageViewModel$500</ID>
13-
<ID>MagicNumber:ZimManageViewModel.kt$ZimManageViewModel$60</ID>
14+
<ID>NestedBlockDepth:PeerGroupHandshake.kt$PeerGroupHandshake$readHandshakeAndExchangeMetaData</ID>
15+
<ID>NestedBlockDepth:ReceiverHandShake.kt$ReceiverHandShake$exchangeFileTransferMetadata</ID>
1416
<ID>PackageNaming:AvailableSpaceCalculator.kt$package org.kiwix.kiwixmobile.zim_manager.library_view</ID>
1517
<ID>PackageNaming:ConnectivityBroadcastReceiver.kt$package org.kiwix.kiwixmobile.zim_manager</ID>
1618
<ID>PackageNaming:DefaultLanguageProvider.kt$package org.kiwix.kiwixmobile.zim_manager</ID>
@@ -36,8 +38,12 @@
3638
<ID>PackageNaming:ZimManageViewModel.kt$package org.kiwix.kiwixmobile.zim_manager</ID>
3739
<ID>ReturnCount:Fat32Checker.kt$Fat32Checker$private fun canCreate4GbFile(storage: String): Boolean</ID>
3840
<ID>TooGenericExceptionCaught:FileWritingFileSystemChecker.kt$FileWritingFileSystemChecker$e: Exception</ID>
41+
<ID>TooGenericExceptionCaught:PeerGroupHandshake.kt$PeerGroupHandshake$ex: Exception</ID>
42+
<ID>TooGenericExceptionCaught:ReceiverHandShake.kt$ReceiverHandShake$e: Exception</ID>
43+
<ID>TooGenericExceptionCaught:SenderHandShake.kt$SenderHandShake$e: Exception</ID>
3944
<ID>TooGenericExceptionThrown:ActivityExtensions.kt$throw RuntimeException( """ applicationContext is ${applicationContext::class.java.simpleName} application is ${application::class.java.simpleName} """.trimIndent() )</ID>
4045
<ID>TooGenericExceptionThrown:LibraryViewHolder.kt$LibraryViewHolder.LibraryBookViewHolder$throw RuntimeException("impossible invalid state: ${item.fileSystemState}")</ID>
4146
<ID>TooGenericExceptionThrown:ZimManageViewModel.kt$ZimManageViewModel$throw RuntimeException("Impossible state")</ID>
47+
<ID>VariableNaming:PeerGroupHandshake.kt$PeerGroupHandshake$private val HANDSHAKE_MESSAGE = "Request Kiwix File Sharing"</ID>
4248
</Whitelist>
4349
</SmellBaseline>

app/src/androidTest/java/org/kiwix/kiwixmobile/BaseActivityTest.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ import org.junit.Rule
2929
import org.junit.runner.RunWith
3030
import org.kiwix.kiwixmobile.core.di.components.DaggerTestComponent
3131
import org.kiwix.kiwixmobile.core.di.components.TestComponent
32+
import org.kiwix.kiwixmobile.main.KiwixMainActivity
3233

3334
@RunWith(AndroidJUnit4::class)
34-
abstract class BaseActivityTest<T : Activity> {
35+
abstract class BaseActivityTest {
3536
@get:Rule
36-
abstract var activityRule: ActivityTestRule<T>
37+
open var activityRule = ActivityTestRule(KiwixMainActivity::class.java)
3738

3839
@get:Rule
3940
var readPermissionRule: GrantPermissionRule =

0 commit comments

Comments
 (0)