Skip to content

Commit

Permalink
Merge branch 'release/1.2.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
mshdabiola committed Jun 12, 2024
2 parents 789e57d + 9031720 commit ca86669
Show file tree
Hide file tree
Showing 12 changed files with 106 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ jobs:
min-coverage-changed-files: 60
paths: |
${{ github.workspace }}/**/build/reports/jacoco/**/*Report.xml
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.TOKEN }}

- name: Upload local coverage reports (XML + HTML) (only API 30)
if: matrix.api-level == 30
Expand Down
70 changes: 53 additions & 17 deletions build-logic/convention/src/main/kotlin/com/mshdabiola/app/Jacoco.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
package com.mshdabiola.app

import com.android.build.api.artifact.ScopedArtifact
import com.android.build.api.variant.AndroidComponentsExtension
import com.android.build.api.variant.ScopedArtifacts
import org.gradle.api.Project
import org.gradle.api.file.Directory
import org.gradle.api.file.RegularFile
import org.gradle.api.provider.ListProperty
import org.gradle.api.tasks.testing.Test
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.register
Expand All @@ -16,57 +21,87 @@ private val coverageExclusions = listOf(
"**/R.class",
"**/R\$*.class",
"**/BuildConfig.*",
"**/Manifest*.*"
"**/Manifest*.*",
"**/*_Hilt*.class",
"**/Hilt_*.class",
)

private fun String.capitalize() = replaceFirstChar {
if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString()
}

/**
* Creates a new task that generates a combined coverage report with data from local and
* instrumented tests.
*
* `create{variant}CombinedCoverageReport`
*
* Note that coverage data must exist before running the task. This allows us to run device
* tests on CI using a different Github Action or an external device farm.
*/
internal fun Project.configureJacoco(
androidComponentsExtension: AndroidComponentsExtension<*, *, *>,
) {
configure<JacocoPluginExtension> {
toolVersion = libs.findVersion("jacoco").get().toString()
}

val jacocoTestReport = tasks.create("jacocoTestReport")

androidComponentsExtension.onVariants { variant ->
val testTaskName = "test${variant.name.capitalize()}UnitTest"
val myObjFactory = project.objects
val buildDir = layout.buildDirectory.get().asFile
val allJars: ListProperty<RegularFile> = myObjFactory.listProperty(RegularFile::class.java)
val allDirectories: ListProperty<Directory> =
myObjFactory.listProperty(Directory::class.java)
val reportTask =
tasks.register("jacoco${testTaskName.capitalize()}Report", JacocoReport::class) {
dependsOn(testTaskName)
tasks.register(
"create${variant.name.capitalize()}CombinedCoverageReport",
JacocoReport::class,
) {

classDirectories.setFrom(
allJars,
allDirectories.map { dirs ->
dirs.map { dir ->
myObjFactory.fileTree().setDir(dir).exclude(coverageExclusions)
}
},
)
reports {
xml.required.set(true)
html.required.set(true)
}

classDirectories.setFrom(
fileTree("$buildDir/tmp/kotlin-classes/${variant.name}") {
exclude(coverageExclusions)
}
)

// TODO: This is missing files in src/debug/, src/prod, src/demo, src/demoDebug...
sourceDirectories.setFrom(
files(
"$projectDir/src/main/java",
"$projectDir/src/main/kotlin"
)
"$projectDir/src/main/kotlin",
),
)

executionData.setFrom(
project.fileTree("$buildDir/outputs/unit_test_code_coverage/${variant.name}UnitTest")
.matching { include("**/*.exec") },

project.fileTree("$buildDir/outputs/code_coverage/${variant.name}AndroidTest")
.matching { include("**/*.ec") },
)
executionData.setFrom(file("$buildDir/jacoco/$testTaskName.exec"))
}

jacocoTestReport.dependsOn(reportTask)

variant.artifacts.forScope(ScopedArtifacts.Scope.PROJECT)
.use(reportTask)
.toGet(
ScopedArtifact.CLASSES,
{ _ -> allJars },
{ _ -> allDirectories },
)
}

tasks.withType<Test>().configureEach {
configure<JacocoTaskExtension> {
// Required for JaCoCo + Robolectric
// https://github.com/robolectric/robolectric/issues/2230
// TODO: Consider removing if not we don't add Robolectric
isIncludeNoLocationClasses = true

// Required for JDK 11 with the above
Expand All @@ -75,3 +110,4 @@ internal fun Project.configureJacoco(
}
}
}

34 changes: 34 additions & 0 deletions distribution/whatsnew/101.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
What's new?
* Support for Chinese (Simplified), Greek, Indonesian, Kannada, Lithuanian, Polish, Tamil, and Telugu languages
* Switch to uprotocol content-sharing library
* Categorize Music by Albums and Artists
* Categorize Image and Video sections by folder
* Categorize content in Web Share
* Show all transfers in one place
* Support for Android 10 and 11
* Option to follow system theme
* Encrypted connections
* Show more detailed transfer status in the app
* Send split APKs

Fixes
* Random connection failures when connecting
* The service discovery issue on Android 4.3 and below
* QR code won't work at times
* Web Share file name and charset issues
* Doesn't work even though Location Service is on
* Crashes if sending too many files

Improvements
* Stop the app service when the user leaves the app and there is no ongoing task
* Better app navigation
* All tasks appear as a single notification
* Drop Phone & Calls permission
* Don't automatically save on content transfer attempts
* Web Share is on by default when you are in the app
* The quick-settings tile takes the user to the app on long-press
* It is easier to use Web Share now

Miscellaneous
* Rewritten in Kotlin
* Move to Android Architecture Components
17 changes: 17 additions & 0 deletions fastlane/metadata/android/en-US/full_description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Play NotePad: Organize Your Life in Style

Stay on top of your personal and professional life with Play NotePad, a feature-rich note-taking app designed for efficiency.

MAIN FEATURES

* Effortless Note Taking: Create and edit text notes, attach photos and drawings, or record audio for on-the-go capture.
* Enhanced Organization: Categorize notes with labels, set reminders for deadlines, and prioritize tasks with pinning.
* Visual Appeal: Personalize your note backgrounds with colors and images, and choose between list or column view for easy navigation.
* Offline Access: Never lose your notes, even without an internet connection.
* Seamless Collaboration: Share notes via email or messaging for effective teamwork.

Play NotePad is more than just a notepad - it's your essential companion for managing and organizing your notes in style.**


Source code:
http://github.com/mshdabiola/notepad
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/shot_description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Robust note-taking app with multimedia and organizational features

0 comments on commit ca86669

Please sign in to comment.