summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2021-12-11 00:12:54 +0530
committerGitHub <noreply@github.com>2021-12-11 00:12:54 +0530
commit7d39bc0ae201361eb787055ccb0d5edcb31f83a2 (patch)
treef1f7154a7ecf17acd2bb45ed8735a4750203d0c7
parentb59c4f068cd9f4791a78d94c3c75f7484423f977 (diff)
Miscellaneous build and CI cleanups (#1587)
-rw-r--r--.github/workflows/pull_request.yml6
-rw-r--r--autofill-parser/build.gradle.kts4
-rw-r--r--build-logic/android-plugins/build.gradle.kts2
-rw-r--r--build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.android-library.gradle.kts11
-rw-r--r--build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.published-android-library.gradle.kts22
-rw-r--r--build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-library.gradle.kts8
-rw-r--r--dependency-sync/build.gradle.kts2
-rw-r--r--gradle/libs.versions.toml4
-rw-r--r--openpgp-ktx/build.gradle.kts4
-rw-r--r--settings.gradle.kts6
10 files changed, 40 insertions, 29 deletions
diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml
index fd216614..b1eccac2 100644
--- a/.github/workflows/pull_request.yml
+++ b/.github/workflows/pull_request.yml
@@ -224,12 +224,6 @@ jobs:
with:
arguments: koverXmlReport
- - name: Collect coverage reports
- if: ${{ steps.service-changed.outputs.result == 'true' }}
- uses: gradle/gradle-build-action@v2.0.1
- with:
- arguments: koverCollectReports
-
- name: Export coverage XMLs
if: ${{ steps.service-changed.outputs.result == 'true' }}
id: coverage-export
diff --git a/autofill-parser/build.gradle.kts b/autofill-parser/build.gradle.kts
index b97afc0c..f164f07e 100644
--- a/autofill-parser/build.gradle.kts
+++ b/autofill-parser/build.gradle.kts
@@ -4,11 +4,9 @@
*/
plugins {
- id("com.github.android-password-store.android-library")
+ id("com.github.android-password-store.published-android-library")
id("com.github.android-password-store.kotlin-android")
id("com.github.android-password-store.kotlin-library")
- id("com.vanniktech.maven.publish")
- id("org.jetbrains.dokka")
id("com.github.android-password-store.psl-plugin")
}
diff --git a/build-logic/android-plugins/build.gradle.kts b/build-logic/android-plugins/build.gradle.kts
index 0f6111ba..413ab560 100644
--- a/build-logic/android-plugins/build.gradle.kts
+++ b/build-logic/android-plugins/build.gradle.kts
@@ -19,5 +19,7 @@ gradlePlugin {
dependencies {
implementation(libs.build.agp)
+ implementation(libs.build.dokka)
+ implementation(libs.build.mavenpublish)
implementation(libs.build.semver)
}
diff --git a/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.android-library.gradle.kts b/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.android-library.gradle.kts
index 993bc2a4..cb6d8a40 100644
--- a/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.android-library.gradle.kts
+++ b/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.android-library.gradle.kts
@@ -3,18 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
-import org.gradle.kotlin.dsl.provideDelegate
-import org.gradle.plugins.signing.SigningExtension
-
plugins {
id("com.android.library")
id("com.github.android-password-store.android-common")
}
-
-afterEvaluate {
- extensions.configure<SigningExtension> {
- val signingKey: String? by project
- val signingPassword: String? by project
- useInMemoryPgpKeys(signingKey, signingPassword)
- }
-}
diff --git a/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.published-android-library.gradle.kts b/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.published-android-library.gradle.kts
new file mode 100644
index 00000000..85ebdbe3
--- /dev/null
+++ b/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.published-android-library.gradle.kts
@@ -0,0 +1,22 @@
+/*
+ * Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved.
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+
+import org.gradle.kotlin.dsl.configure
+import org.gradle.kotlin.dsl.provideDelegate
+import org.gradle.plugins.signing.SigningExtension
+
+plugins {
+ id("com.github.android-password-store.android-library")
+ id("com.vanniktech.maven.publish")
+ id("org.jetbrains.dokka")
+}
+
+afterEvaluate {
+ extensions.configure<SigningExtension> {
+ val signingKey: String? by project
+ val signingPassword: String? by project
+ useInMemoryPgpKeys(signingKey, signingPassword)
+ }
+}
diff --git a/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-library.gradle.kts b/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-library.gradle.kts
index d8e88bf5..8dfa887f 100644
--- a/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-library.gradle.kts
+++ b/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-library.gradle.kts
@@ -19,6 +19,10 @@ tasks.withType<KotlinCompile>().configureEach {
}
}
-tasks.koverCollectReports {
- outputDir.set(rootProject.layout.buildDirectory.dir("coverage-reports"))
+tasks.koverXmlReport {
+ xmlReportFile.set(rootProject.layout.buildDirectory.file("coverage-reports/${project.name}.xml"))
+}
+
+tasks.koverHtmlReport {
+ htmlReportDir.set(rootProject.layout.buildDirectory.dir("coverage-reports/${project.name}"))
}
diff --git a/dependency-sync/build.gradle.kts b/dependency-sync/build.gradle.kts
index 308b8b57..b45a295a 100644
--- a/dependency-sync/build.gradle.kts
+++ b/dependency-sync/build.gradle.kts
@@ -9,9 +9,11 @@ dependencies {
// Build tooling
dependencySync("com.android.tools.build:gradle:7.0.3")
dependencySync("org.jetbrains.kotlinx:binary-compatibility-validator:0.8.0")
+ dependencySync("org.jetbrains.dokka:dokka-gradle-plugin:1.6.0")
dependencySync("de.undercouch:gradle-download-task:4.1.2")
dependencySync("com.google.dagger:hilt-android-gradle-plugin:2.40.5")
dependencySync("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.0")
+ dependencySync("com.vanniktech:gradle-maven-publish-plugin:0.18.0")
dependencySync("com.squareup.okhttp3:okhttp:4.9.3")
dependencySync("com.vdurmont:semver4j:3.1.0")
dependencySync("com.diffplug.spotless:spotless-plugin-gradle:6.0.4")
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 59a80c93..aa34f38a 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -67,6 +67,8 @@ kotlin-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines
kotlin-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
kotlin-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }
+build-dokka = "org.jetbrains.dokka:dokka-gradle-plugin:1.6.0"
+
build-download = "de.undercouch:gradle-download-task:4.1.2"
build-hilt = "com.google.dagger:hilt-android-gradle-plugin:2.40.5"
@@ -77,6 +79,8 @@ dagger-hilt-core = { module = "com.google.dagger:hilt-core", version.ref = "hilt
build-kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.0"
testing-kotlintest-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
+build-mavenpublish = "com.vanniktech:gradle-maven-publish-plugin:0.18.0"
+
build-okhttp = "com.squareup.okhttp3:okhttp:4.9.3"
build-semver = "com.vdurmont:semver4j:3.1.0"
diff --git a/openpgp-ktx/build.gradle.kts b/openpgp-ktx/build.gradle.kts
index 37ebbc62..d29d18d5 100644
--- a/openpgp-ktx/build.gradle.kts
+++ b/openpgp-ktx/build.gradle.kts
@@ -4,11 +4,9 @@
*/
plugins {
- id("com.github.android-password-store.android-library")
+ id("com.github.android-password-store.published-android-library")
id("com.github.android-password-store.kotlin-android")
id("com.github.android-password-store.kotlin-library")
- id("com.vanniktech.maven.publish")
- id("org.jetbrains.dokka")
}
android {
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 9ea2cd3b..b215b7e7 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -3,6 +3,8 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
+rootProject.name = "APS"
+
// Plugin repositories
pluginManagement {
repositories {
@@ -11,10 +13,6 @@ pluginManagement {
mavenCentral()
gradlePluginPortal()
}
- plugins {
- id("com.vanniktech.maven.publish") version "0.18.0" apply false
- id("org.jetbrains.dokka") version "1.6.0" apply false
- }
}
dependencyResolutionManagement {