Skip to content

Commit

Permalink
Merge branch 'main' into feature/pp-389
Browse files Browse the repository at this point in the history
  • Loading branch information
io7m committed Oct 16, 2023
2 parents 86b5345 + ed05174 commit 496ddbe
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/android-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
CI_GITHUB_ACCESS_TOKEN: ${{ secrets.CI_GITHUB_ACCESS_TOKEN }}
CI_AWS_ACCESS_ID: ${{ secrets.CI_AWS_ACCESS_ID }}
CI_AWS_SECRET_KEY: ${{ secrets.CI_AWS_SECRET_KEY }}
TRANSIFEX_TOKEN: ${{ secrets.TRANSIFEX_TOKEN }}
TRANSIFEX_SECRET: ${{ secrets.TRANSIFEX_SECRET }}
TAG_NAME: ${{ env.TAG_NAME }}
run: .ci/ci-main.sh normal
- name: Upload test report
Expand Down
9 changes: 7 additions & 2 deletions README-CHANGES.xml
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@
<c:change date="2023-08-12T00:00:00+00:00" summary="Fixed crash when time tracking is not enabled."/>
</c:changes>
</c:release>
<c:release date="2023-10-07T13:46:32+00:00" is-open="true" ticket-system="org.nypl.jira" version="1.6.0">
<c:release date="2023-10-11T00:00:00+00:00" is-open="false" ticket-system="org.nypl.jira" version="1.6.0">
<c:changes>
<c:change date="2023-08-24T00:00:00+00:00" summary="Updated Kotlin version to 1.9.0"/>
<c:change date="2023-08-28T00:00:00+00:00" summary="Fixed crash when opening an audiobook with a null manifest."/>
Expand Down Expand Up @@ -329,7 +329,12 @@
<c:change date="2023-09-21T00:00:00+00:00" summary="Added support to EPUB text searching."/>
<c:change date="2023-09-22T00:00:00+00:00" summary="Added push notifications option to DEV settings."/>
<c:change date="2023-09-26T00:00:00+00:00" summary="Fixed bookmarks not being deleted."/>
<c:change date="2023-10-07T13:46:32+00:00" summary="Fixed Audiobook UI freezing after pressing 'play'."/>
<c:change date="2023-10-07T00:00:00+00:00" summary="Fixed Audiobook UI freezing after pressing 'play'."/>
</c:changes>
</c:release>
<c:release date="2023-10-16T11:36:56+00:00" is-open="true" ticket-system="org.nypl.jira" version="1.6.1">
<c:changes>
<c:change date="2023-10-16T11:36:56+00:00" summary="Fixed crash when creating a library card."/>
</c:changes>
</c:release>
</c:releases>
Expand Down
64 changes: 57 additions & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ if (gradleVersionRequired != gradleVersionReceived) {
}

plugins {
signing

id("org.jetbrains.kotlin.jvm")
.version("1.9.0")
.apply(false)
Expand Down Expand Up @@ -104,6 +106,14 @@ fun property(
return project.extra[name] as String
}

fun propertyOptional(project: Project, name: String): String? {
val map = project.extra
if (map.has(name)) {
return map[name] as String?
}
return null
}

fun propertyInt(
project: Project,
name: String,
Expand All @@ -120,6 +130,15 @@ fun propertyBoolean(
return text.toBooleanStrict()
}

fun propertyBooleanOptional(
project: Project,
name: String,
defaultValue: Boolean,
): Boolean {
val value = propertyOptional(project, name) ?: return defaultValue
return value.toBooleanStrict()
}

/**
* Configure Maven publishing. Artifacts are published to a local directory
* so that they can be pushed to Maven Central in one step using brooklime.
Expand All @@ -138,6 +157,8 @@ fun configurePublishingFor(project: Project) {

val publishSources =
propertyBoolean(project, "org.thepalaceproject.build.publishSources")
val enableSigning =
propertyBooleanOptional(project, "org.thepalaceproject.build.enableSigning", true)

/*
* Create an empty JavaDoc jar. Required for Maven Central deployments.
Expand All @@ -148,28 +169,50 @@ fun configurePublishingFor(project: Project) {
this.archiveClassifier = "javadoc"
}

/*
* Create a publication. Note that the name of the publication must be unique across all
* modules, because the broken Gradle signing plugin will create a signing task for each
* one that, in the case of a name conflict, will silently overwrite the previous signing
* task.
*/

project.publishing {
publications {
create<MavenPublication>("MavenPublication") {
create<MavenPublication>("_${project.name}_MavenPublication") {
groupId = property(project, "GROUP")
artifactId = property(project, "POM_ARTIFACT_ID")
version = versionName

/*
* https://central.sonatype.org/publish/requirements/#sufficient-metadata
*/

pom {
name.set(property(project, "POM_NAME"))
description.set(property(project, "POM_DESCRIPTION"))
url.set(property(project, "POM_URL"))

scm {
connection.set(property(project, "POM_SCM_CONNECTION"))
developerConnection.set(property(project, "POM_SCM_DEV_CONNECTION"))
url.set(property(project, "POM_SCM_URL"))
}

licenses {
license {
name.set(property(project, "POM_LICENCE_NAME"))
url.set(property(project, "POM_LICENCE_URL"))
}
}

developers {
developer {
name.set("The Palace Project")
email.set("info@thepalaceproject.org")
organization.set("The Palace Project")
organizationUrl.set("https://thepalaceproject.org/")
}
}
}

artifact(taskJavadocEmpty)
Expand Down Expand Up @@ -244,6 +287,17 @@ fun configurePublishingFor(project: Project) {
task.dependsOn.add(taskSourcesEmpty)
}
}

/*
* Configure signing.
*/

if (enableSigning) {
signing {
useGpgCmd()
sign(project.publishing.publications)
}
}
}

/*
Expand Down Expand Up @@ -511,16 +565,12 @@ allprojects {
propertyInt(this, "org.thepalaceproject.build.androidSDKCompile")

android.defaultConfig {
versionName =
property(this@allprojects, "VERSION_NAME")
multiDexEnabled =
true
multiDexEnabled = true
targetSdk =
propertyInt(this@allprojects, "org.thepalaceproject.build.androidSDKTarget")
minSdk =
propertyInt(this@allprojects, "org.thepalaceproject.build.androidSDKMinimum")
testInstrumentationRunner =
"androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

/*
Expand Down
1 change: 1 addition & 0 deletions simplified-app-palace/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ dependencies {
implementation(libs.play.services.base)
implementation(libs.play.services.basement)
implementation(libs.play.services.cloud.messaging)
implementation(libs.play.services.location)
implementation(libs.play.services.measurement)
implementation(libs.play.services.measurement.api)
implementation(libs.play.services.measurement.base)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -848,8 +848,7 @@ class AudioBookPlayerActivity :
*/

this.uiThread.runOnUIThread {
val fragment =
PlayerSleepTimerFragment.newInstance(PlayerFragmentParameters())
val fragment = PlayerSleepTimerFragment.newInstance()
fragment.show(this.supportFragmentManager, "PLAYER_SLEEP_TIMER")
}
}
Expand Down

0 comments on commit 496ddbe

Please sign in to comment.