Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add binary-compatibility-validator to Chucker #509

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/pre-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,27 @@ jobs:
- name: Stop Gradle
run: ./gradlew --stop

api-check:
runs-on: [ubuntu-latest]

steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Cache Gradle Folders
uses: actions/cache@v2
with:
path: |
~/.gradle/caches/
~/.gradle/wrapper/
key: cache-gradle-${{ hashFiles('build.gradle') }}
restore-keys: cache-gradle-

- name: Run apiCheck
run: ./gradlew apiCheck

- name: Stop Gradle
run: ./gradlew --stop

publish-artifact:
runs-on: [ubuntu-latest]

Expand Down
11 changes: 11 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ buildscript {
retrofitVersion = '2.9.0'

// Debug and quality control
binaryCompatibilityValidator = '0.2.4'
detektVersion = '1.14.0'
dokkaVersion = '1.4.10.2'
ktLintVersion = '0.39.0'
Expand Down Expand Up @@ -49,8 +50,18 @@ buildscript {
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokkaVersion"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detektVersion"
classpath "org.jlleitschuh.gradle:ktlint-gradle:$ktLintGradleVersion"
classpath "org.jetbrains.kotlinx:binary-compatibility-validator:$binaryCompatibilityValidator"
}
}
apply plugin: 'binary-compatibility-validator'

apiValidation {
ignoredProjects += ["sample"]
ignoredPackages += [
"com.chuckerteam.chucker.internal",
"com.chuckerteam.chucker.databinding"
]
}

allprojects {
version = VERSION_NAME
Expand Down
56 changes: 56 additions & 0 deletions library-no-op/api/library-no-op.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
public final class com/chuckerteam/chucker/BuildConfig {
public static final field BUILD_TYPE Ljava/lang/String;
cortinico marked this conversation as resolved.
Show resolved Hide resolved
public static final field DEBUG Z
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String;
public fun <init> ()V
}

public final class com/chuckerteam/chucker/api/Chucker {
public static final field INSTANCE Lcom/chuckerteam/chucker/api/Chucker;
public static final fun dismissNotifications (Landroid/content/Context;)V
public static final fun getLaunchIntent (Landroid/content/Context;)Landroid/content/Intent;
public final fun isOp ()Z
}

public final class com/chuckerteam/chucker/api/ChuckerCollector {
public fun <init> (Landroid/content/Context;)V
public fun <init> (Landroid/content/Context;Z)V
public fun <init> (Landroid/content/Context;ZLcom/chuckerteam/chucker/api/RetentionManager$Period;)V
public synthetic fun <init> (Landroid/content/Context;ZLcom/chuckerteam/chucker/api/RetentionManager$Period;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getShowNotification ()Z
public final fun setShowNotification (Z)V
}

public final class com/chuckerteam/chucker/api/ChuckerInterceptor : okhttp3/Interceptor {
public fun <init> (Landroid/content/Context;)V
public synthetic fun <init> (Lcom/chuckerteam/chucker/api/ChuckerInterceptor$Builder;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun intercept (Lokhttp3/Interceptor$Chain;)Lokhttp3/Response;
public final fun redactHeaders ([Ljava/lang/String;)Lcom/chuckerteam/chucker/api/ChuckerInterceptor;
}

public final class com/chuckerteam/chucker/api/ChuckerInterceptor$Builder {
public fun <init> (Landroid/content/Context;)V
public final fun alwaysReadResponseBody (Z)Lcom/chuckerteam/chucker/api/ChuckerInterceptor$Builder;
public final fun build ()Lcom/chuckerteam/chucker/api/ChuckerInterceptor;
public final fun collector (Lcom/chuckerteam/chucker/api/ChuckerCollector;)Lcom/chuckerteam/chucker/api/ChuckerInterceptor$Builder;
public final fun maxContentLength (J)Lcom/chuckerteam/chucker/api/ChuckerInterceptor$Builder;
public final fun redactHeaders (Ljava/lang/Iterable;)Lcom/chuckerteam/chucker/api/ChuckerInterceptor$Builder;
public final fun redactHeaders ([Ljava/lang/String;)Lcom/chuckerteam/chucker/api/ChuckerInterceptor$Builder;
}

public final class com/chuckerteam/chucker/api/RetentionManager {
public fun <init> (Landroid/content/Context;)V
public fun <init> (Landroid/content/Context;Ljava/lang/Object;)V
public synthetic fun <init> (Landroid/content/Context;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun doMaintenance ()V
}

public final class com/chuckerteam/chucker/api/RetentionManager$Period : java/lang/Enum {
public static final field FOREVER Lcom/chuckerteam/chucker/api/RetentionManager$Period;
public static final field ONE_DAY Lcom/chuckerteam/chucker/api/RetentionManager$Period;
public static final field ONE_HOUR Lcom/chuckerteam/chucker/api/RetentionManager$Period;
public static final field ONE_WEEK Lcom/chuckerteam/chucker/api/RetentionManager$Period;
public static fun valueOf (Ljava/lang/String;)Lcom/chuckerteam/chucker/api/RetentionManager$Period;
public static fun values ()[Lcom/chuckerteam/chucker/api/RetentionManager$Period;
}

55 changes: 55 additions & 0 deletions library/api/library.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
public final class com/chuckerteam/chucker/BuildConfig {
public static final field BUILD_TYPE Ljava/lang/String;
cortinico marked this conversation as resolved.
Show resolved Hide resolved
public static final field DEBUG Z
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String;
public fun <init> ()V
}

public final class com/chuckerteam/chucker/api/Chucker {
public static final field INSTANCE Lcom/chuckerteam/chucker/api/Chucker;
public static final fun dismissNotifications (Landroid/content/Context;)V
public static final fun getLaunchIntent (Landroid/content/Context;)Landroid/content/Intent;
public final fun isOp ()Z
}

public final class com/chuckerteam/chucker/api/ChuckerCollector {
public fun <init> (Landroid/content/Context;)V
public fun <init> (Landroid/content/Context;Z)V
public fun <init> (Landroid/content/Context;ZLcom/chuckerteam/chucker/api/RetentionManager$Period;)V
public synthetic fun <init> (Landroid/content/Context;ZLcom/chuckerteam/chucker/api/RetentionManager$Period;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getShowNotification ()Z
public final fun setShowNotification (Z)V
}

public final class com/chuckerteam/chucker/api/ChuckerInterceptor : okhttp3/Interceptor {
public fun <init> (Landroid/content/Context;)V
public synthetic fun <init> (Lcom/chuckerteam/chucker/api/ChuckerInterceptor$Builder;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun intercept (Lokhttp3/Interceptor$Chain;)Lokhttp3/Response;
public final fun redactHeader ([Ljava/lang/String;)V
}

public final class com/chuckerteam/chucker/api/ChuckerInterceptor$Builder {
public fun <init> (Landroid/content/Context;)V
public final fun alwaysReadResponseBody (Z)Lcom/chuckerteam/chucker/api/ChuckerInterceptor$Builder;
public final fun build ()Lcom/chuckerteam/chucker/api/ChuckerInterceptor;
public final fun collector (Lcom/chuckerteam/chucker/api/ChuckerCollector;)Lcom/chuckerteam/chucker/api/ChuckerInterceptor$Builder;
public final fun maxContentLength (J)Lcom/chuckerteam/chucker/api/ChuckerInterceptor$Builder;
public final fun redactHeaders (Ljava/lang/Iterable;)Lcom/chuckerteam/chucker/api/ChuckerInterceptor$Builder;
public final fun redactHeaders ([Ljava/lang/String;)Lcom/chuckerteam/chucker/api/ChuckerInterceptor$Builder;
}

public final class com/chuckerteam/chucker/api/RetentionManager {
public fun <init> (Landroid/content/Context;)V
public fun <init> (Landroid/content/Context;Lcom/chuckerteam/chucker/api/RetentionManager$Period;)V
public synthetic fun <init> (Landroid/content/Context;Lcom/chuckerteam/chucker/api/RetentionManager$Period;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
}

public final class com/chuckerteam/chucker/api/RetentionManager$Period : java/lang/Enum {
public static final field FOREVER Lcom/chuckerteam/chucker/api/RetentionManager$Period;
public static final field ONE_DAY Lcom/chuckerteam/chucker/api/RetentionManager$Period;
public static final field ONE_HOUR Lcom/chuckerteam/chucker/api/RetentionManager$Period;
public static final field ONE_WEEK Lcom/chuckerteam/chucker/api/RetentionManager$Period;
public static fun valueOf (Ljava/lang/String;)Lcom/chuckerteam/chucker/api/RetentionManager$Period;
public static fun values ()[Lcom/chuckerteam/chucker/api/RetentionManager$Period;
}