Misc cleanups to build-logic and expand BCV exclusion list (#1622)

* build-logic: remove `kotlin-dsl-precompiled-script-plugins` plugin

* build-logic: use generated accessors for extensions

* build: exclude non-published library projects from API dump

There's no point in tracking binary compatibility for libraries that are only used internally
This commit is contained in:
Harsh Shandilya 2021-12-26 11:59:57 +05:30 committed by GitHub
parent 43f6a0090f
commit 674a7d299b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 18 additions and 200 deletions

View file

@ -8,10 +8,7 @@ import org.gradle.api.tasks.compile.JavaCompile
import org.gradle.kotlin.dsl.withType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
`kotlin-dsl`
`kotlin-dsl-precompiled-script-plugins`
}
plugins { `kotlin-dsl` }
afterEvaluate {
tasks.withType<JavaCompile>().configureEach {

View file

@ -3,10 +3,8 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
import com.android.build.gradle.internal.dsl.BaseAppModuleExtension
import flavors.FlavorDimensions
import flavors.ProductFlavors
import org.gradle.kotlin.dsl.configure
import signing.configureBuildSigning
plugins {
@ -22,7 +20,7 @@ fun Project.isSnapshot(): Boolean {
}
}
extensions.configure<BaseAppModuleExtension> {
android {
val minifySwitch =
project.providers.environmentVariable("DISABLE_MINIFY").forUseAtConfigurationTime()

View file

@ -3,9 +3,7 @@
* 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")
@ -14,7 +12,7 @@ plugins {
}
afterEvaluate {
extensions.configure<SigningExtension> {
signing {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)

View file

@ -8,10 +8,7 @@ import org.gradle.api.tasks.compile.JavaCompile
import org.gradle.kotlin.dsl.withType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
`kotlin-dsl`
`kotlin-dsl-precompiled-script-plugins`
}
plugins { `kotlin-dsl` }
afterEvaluate {
tasks.withType<JavaCompile>().configureEach {

View file

@ -8,10 +8,7 @@ import org.gradle.api.tasks.compile.JavaCompile
import org.gradle.kotlin.dsl.withType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
`kotlin-dsl`
`kotlin-dsl-precompiled-script-plugins`
}
plugins { `kotlin-dsl` }
afterEvaluate {
tasks.withType<JavaCompile>().configureEach {

View file

@ -3,9 +3,17 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
import kotlinx.validation.ApiValidationExtension
import org.gradle.kotlin.dsl.configure
plugins { id("org.jetbrains.kotlinx.binary-compatibility-validator") }
extensions.configure<ApiValidationExtension> { ignoredProjects = mutableSetOf("app") }
apiValidation {
ignoredProjects =
mutableSetOf(
"app",
"coroutine-utils",
"coroutine-utils-testing",
"crypto-common",
"crypto-pgpainless",
"format-common",
"diceware",
)
}

View file

@ -4,8 +4,6 @@
*/
import org.gradle.api.Project
import org.gradle.kotlin.dsl.configure
import org.jetbrains.kotlin.gradle.plugin.KaptExtension
plugins {
kotlin("android")
@ -13,7 +11,7 @@ plugins {
}
afterEvaluate {
extensions.configure<KaptExtension> {
kapt {
javacOptions {
if (hasDaggerCompilerDependency()) {
// https://dagger.dev/dev-guide/compiler-options#fastinit-mode

View file

@ -1,8 +0,0 @@
public final class dev/msfjarvis/aps/test/CoroutineTestRule : org/junit/rules/TestWatcher {
public fun <init> ()V
public fun <init> (Lkotlinx/coroutines/test/TestDispatcher;)V
public synthetic fun <init> (Lkotlinx/coroutines/test/TestDispatcher;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getTestDispatcher ()Lkotlinx/coroutines/test/TestDispatcher;
public final fun getTestDispatcherProvider ()Ldev/msfjarvis/aps/util/coroutines/DispatcherProvider;
}

View file

@ -1,22 +0,0 @@
public final class dev/msfjarvis/aps/util/coroutines/DefaultDispatcherProvider : dev/msfjarvis/aps/util/coroutines/DispatcherProvider {
public fun <init> ()V
public fun default ()Lkotlinx/coroutines/CoroutineDispatcher;
public fun io ()Lkotlinx/coroutines/CoroutineDispatcher;
public fun main ()Lkotlinx/coroutines/CoroutineDispatcher;
public fun unconfined ()Lkotlinx/coroutines/CoroutineDispatcher;
}
public abstract interface class dev/msfjarvis/aps/util/coroutines/DispatcherProvider {
public abstract fun default ()Lkotlinx/coroutines/CoroutineDispatcher;
public abstract fun io ()Lkotlinx/coroutines/CoroutineDispatcher;
public abstract fun main ()Lkotlinx/coroutines/CoroutineDispatcher;
public abstract fun unconfined ()Lkotlinx/coroutines/CoroutineDispatcher;
}
public final class dev/msfjarvis/aps/util/coroutines/DispatcherProvider$DefaultImpls {
public static fun default (Ldev/msfjarvis/aps/util/coroutines/DispatcherProvider;)Lkotlinx/coroutines/CoroutineDispatcher;
public static fun io (Ldev/msfjarvis/aps/util/coroutines/DispatcherProvider;)Lkotlinx/coroutines/CoroutineDispatcher;
public static fun main (Ldev/msfjarvis/aps/util/coroutines/DispatcherProvider;)Lkotlinx/coroutines/CoroutineDispatcher;
public static fun unconfined (Ldev/msfjarvis/aps/util/coroutines/DispatcherProvider;)Lkotlinx/coroutines/CoroutineDispatcher;
}

View file

@ -1,63 +0,0 @@
public abstract class dev/msfjarvis/aps/crypto/CryptoException : java/lang/Exception {
public synthetic fun <init> (Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
}
public abstract interface class dev/msfjarvis/aps/crypto/CryptoHandler {
public abstract fun canHandle (Ljava/lang/String;)Z
public abstract fun decrypt (Ljava/lang/String;Ljava/lang/String;Ljava/io/InputStream;Ljava/io/OutputStream;)V
public abstract fun encrypt (Ljava/util/List;Ljava/io/InputStream;Ljava/io/OutputStream;)V
}
public abstract interface class dev/msfjarvis/aps/crypto/KeyManager {
public abstract fun addKey (Ldev/msfjarvis/aps/crypto/KeyPair;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public abstract fun canHandle (Ljava/lang/String;)Z
public abstract fun getAllKeys (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public abstract fun getKeyById (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public abstract fun removeKey (Ldev/msfjarvis/aps/crypto/KeyPair;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public final class dev/msfjarvis/aps/crypto/KeyManager$DefaultImpls {
public static synthetic fun addKey$default (Ldev/msfjarvis/aps/crypto/KeyManager;Ldev/msfjarvis/aps/crypto/KeyPair;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
}
public abstract class dev/msfjarvis/aps/crypto/KeyManagerException : dev/msfjarvis/aps/crypto/CryptoException {
public synthetic fun <init> (Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
}
public final class dev/msfjarvis/aps/crypto/KeyManagerException$KeyAlreadyExistsException : dev/msfjarvis/aps/crypto/KeyManagerException {
public fun <init> (Ljava/lang/String;)V
}
public final class dev/msfjarvis/aps/crypto/KeyManagerException$KeyDeletionFailedException : dev/msfjarvis/aps/crypto/KeyManagerException {
public static final field INSTANCE Ldev/msfjarvis/aps/crypto/KeyManagerException$KeyDeletionFailedException;
}
public final class dev/msfjarvis/aps/crypto/KeyManagerException$KeyDirectoryUnavailableException : dev/msfjarvis/aps/crypto/KeyManagerException {
public static final field INSTANCE Ldev/msfjarvis/aps/crypto/KeyManagerException$KeyDirectoryUnavailableException;
}
public final class dev/msfjarvis/aps/crypto/KeyManagerException$KeyNotFoundException : dev/msfjarvis/aps/crypto/KeyManagerException {
public fun <init> (Ljava/lang/String;)V
}
public final class dev/msfjarvis/aps/crypto/KeyManagerException$NoKeysAvailableException : dev/msfjarvis/aps/crypto/KeyManagerException {
public static final field INSTANCE Ldev/msfjarvis/aps/crypto/KeyManagerException$NoKeysAvailableException;
}
public abstract interface class dev/msfjarvis/aps/crypto/KeyPair {
public abstract fun getKeyId ()Ljava/lang/String;
public abstract fun getPrivateKey ()[B
public abstract fun getPublicKey ()[B
}
public abstract class dev/msfjarvis/aps/crypto/KeyPairException : dev/msfjarvis/aps/crypto/CryptoException {
public synthetic fun <init> (Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
}
public final class dev/msfjarvis/aps/crypto/KeyPairException$PrivateKeyUnavailableException : dev/msfjarvis/aps/crypto/KeyPairException {
public static final field INSTANCE Ldev/msfjarvis/aps/crypto/KeyPairException$PrivateKeyUnavailableException;
}

View file

@ -1,31 +0,0 @@
public final class dev/msfjarvis/aps/crypto/PGPKeyManager : dev/msfjarvis/aps/crypto/KeyManager {
public static final field Companion Ldev/msfjarvis/aps/crypto/PGPKeyManager$Companion;
public fun <init> (Ljava/lang/String;Lkotlinx/coroutines/CoroutineDispatcher;)V
public synthetic fun addKey (Ldev/msfjarvis/aps/crypto/KeyPair;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun addKey (Ldev/msfjarvis/aps/crypto/PGPKeyPair;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun canHandle (Ljava/lang/String;)Z
public fun getAllKeys (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun getKeyById (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun makeKey (Ljava/lang/String;)Ldev/msfjarvis/aps/crypto/PGPKeyPair;
public synthetic fun removeKey (Ldev/msfjarvis/aps/crypto/KeyPair;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun removeKey (Ldev/msfjarvis/aps/crypto/PGPKeyPair;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public final class dev/msfjarvis/aps/crypto/PGPKeyManager$Companion {
public final fun makeKey (Ljava/lang/String;)Ldev/msfjarvis/aps/crypto/PGPKeyPair;
}
public final class dev/msfjarvis/aps/crypto/PGPKeyPair : dev/msfjarvis/aps/crypto/KeyPair {
public fun <init> (Lorg/bouncycastle/openpgp/PGPSecretKey;)V
public fun getKeyId ()Ljava/lang/String;
public fun getPrivateKey ()[B
public fun getPublicKey ()[B
}
public final class dev/msfjarvis/aps/crypto/PGPainlessCryptoHandler : dev/msfjarvis/aps/crypto/CryptoHandler {
public fun <init> ()V
public fun canHandle (Ljava/lang/String;)Z
public fun decrypt (Ljava/lang/String;Ljava/lang/String;Ljava/io/InputStream;Ljava/io/OutputStream;)V
public fun encrypt (Ljava/util/List;Ljava/io/InputStream;Ljava/io/OutputStream;)V
}

View file

@ -1,35 +0,0 @@
public final class dev/msfjarvis/aps/data/passfile/PasswordEntry {
public fun <init> (Ldev/msfjarvis/aps/util/time/UserClock;Ldev/msfjarvis/aps/util/totp/TotpFinder;Ldev/msfjarvis/aps/util/coroutines/DispatcherProvider;Lkotlinx/coroutines/CoroutineScope;[B)V
public final fun getExtraContent ()Ljava/util/Map;
public final fun getExtraContentString ()Ljava/lang/String;
public final fun getExtraContentWithoutAuthData ()Ljava/lang/String;
public final fun getPassword ()Ljava/lang/String;
public final fun getTotp ()Lkotlinx/coroutines/flow/StateFlow;
public final fun getUsername ()Ljava/lang/String;
public final fun hasTotp ()Z
}
public abstract interface class dev/msfjarvis/aps/data/passfile/PasswordEntry$Factory {
public abstract fun create (Lkotlinx/coroutines/CoroutineScope;[B)Ldev/msfjarvis/aps/data/passfile/PasswordEntry;
}
public class dev/msfjarvis/aps/util/time/UserClock : java/time/Clock {
public fun <init> ()V
public fun getZone ()Ljava/time/ZoneId;
public fun instant ()Ljava/time/Instant;
public fun withZone (Ljava/time/ZoneId;)Ljava/time/Clock;
}
public abstract interface class dev/msfjarvis/aps/util/totp/TotpFinder {
public static final field Companion Ldev/msfjarvis/aps/util/totp/TotpFinder$Companion;
public abstract fun findAlgorithm (Ljava/lang/String;)Ljava/lang/String;
public abstract fun findDigits (Ljava/lang/String;)Ljava/lang/String;
public abstract fun findIssuer (Ljava/lang/String;)Ljava/lang/String;
public abstract fun findPeriod (Ljava/lang/String;)J
public abstract fun findSecret (Ljava/lang/String;)Ljava/lang/String;
}
public final class dev/msfjarvis/aps/util/totp/TotpFinder$Companion {
public final fun getTOTP_FIELDS ()[Ljava/lang/String;
}

View file

@ -1,16 +0,0 @@
public final class dev/msfjarvis/aps/passgen/diceware/DicewarePassphraseGenerator {
public static final field DIGITS I
public fun <init> (Ldev/msfjarvis/aps/passgen/diceware/Die;Ljava/io/InputStream;)V
public final fun generatePassphrase (IC)Ljava/lang/String;
}
public final class dev/msfjarvis/aps/passgen/diceware/Die {
public fun <init> (ILdev/msfjarvis/aps/passgen/diceware/RandomIntGenerator;)V
public final fun roll ()I
public final fun rollMultiple (I)I
}
public abstract interface class dev/msfjarvis/aps/passgen/diceware/RandomIntGenerator {
public abstract fun get (Lkotlin/ranges/IntRange;)I
}