Miscellaneous build and CI cleanups (#1587)

This commit is contained in:
Harsh Shandilya 2021-12-11 00:12:54 +05:30 committed by GitHub
parent b59c4f068c
commit 7d39bc0ae2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 40 additions and 29 deletions

View file

@ -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

View file

@ -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")
}

View file

@ -19,5 +19,7 @@ gradlePlugin {
dependencies {
implementation(libs.build.agp)
implementation(libs.build.dokka)
implementation(libs.build.mavenpublish)
implementation(libs.build.semver)
}

View file

@ -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)
}
}

View file

@ -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)
}
}

View file

@ -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}"))
}

View file

@ -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")

View file

@ -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"

View file

@ -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 {

View file

@ -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 {