Skip to content

Commit

Permalink
Merge pull request #101 from Parsely/introduce_binary_compatibility_v…
Browse files Browse the repository at this point in the history
…alidator

Introduce binary compatibility validator
  • Loading branch information
wzieba authored Jan 30, 2024
2 parents 222b14b + c9bbd37 commit 12607a9
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Validate binary compatibility
run: ./gradlew apiCheck
- name: Build library
run: ./gradlew :parsely:assembleDebug
- name: Build example app
Expand Down
53 changes: 53 additions & 0 deletions parsely/api/parsely.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
public final class com/parsely/parselyandroid/ParselyAlreadyInitializedException : java/lang/Exception {
public fun <init> ()V
}

public class com/parsely/parselyandroid/ParselyMetadata {
public fun <init> ()V
public fun <init> (Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/util/Calendar;)V
public synthetic fun <init> (Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/util/Calendar;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
}

public final class com/parsely/parselyandroid/ParselyNotInitializedException : java/lang/Exception {
public fun <init> ()V
}

public abstract interface class com/parsely/parselyandroid/ParselyTracker {
public static final field Companion Lcom/parsely/parselyandroid/ParselyTracker$Companion;
public abstract fun engagementIsActive ()Z
public abstract fun flushTimerIsActive ()Z
public abstract fun getEngagementInterval ()Ljava/lang/Double;
public abstract fun getFlushInterval ()J
public abstract fun getVideoEngagementInterval ()Ljava/lang/Double;
public static fun init (Ljava/lang/String;ILandroid/content/Context;)V
public static fun init (Ljava/lang/String;ILandroid/content/Context;Z)V
public static fun init (Ljava/lang/String;Landroid/content/Context;)V
public abstract fun resetVideo ()V
public static fun sharedInstance ()Lcom/parsely/parselyandroid/ParselyTracker;
public abstract fun startEngagement (Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;)V
public abstract fun stopEngagement ()V
public abstract fun trackPageview (Ljava/lang/String;Ljava/lang/String;Lcom/parsely/parselyandroid/ParselyMetadata;Ljava/util/Map;)V
public abstract fun trackPause ()V
public abstract fun trackPlay (Ljava/lang/String;Ljava/lang/String;Lcom/parsely/parselyandroid/ParselyVideoMetadata;Ljava/util/Map;)V
public abstract fun videoIsActive ()Z
}

public final class com/parsely/parselyandroid/ParselyTracker$Companion {
public final fun init (Ljava/lang/String;ILandroid/content/Context;)V
public final fun init (Ljava/lang/String;ILandroid/content/Context;Z)V
public final fun init (Ljava/lang/String;Landroid/content/Context;)V
public static synthetic fun init$default (Lcom/parsely/parselyandroid/ParselyTracker$Companion;Ljava/lang/String;ILandroid/content/Context;ZILjava/lang/Object;)V
public final fun sharedInstance ()Lcom/parsely/parselyandroid/ParselyTracker;
}

public final class com/parsely/parselyandroid/ParselyTracker$DefaultImpls {
public static synthetic fun startEngagement$default (Lcom/parsely/parselyandroid/ParselyTracker;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;ILjava/lang/Object;)V
public static synthetic fun trackPageview$default (Lcom/parsely/parselyandroid/ParselyTracker;Ljava/lang/String;Ljava/lang/String;Lcom/parsely/parselyandroid/ParselyMetadata;Ljava/util/Map;ILjava/lang/Object;)V
public static synthetic fun trackPlay$default (Lcom/parsely/parselyandroid/ParselyTracker;Ljava/lang/String;Ljava/lang/String;Lcom/parsely/parselyandroid/ParselyVideoMetadata;Ljava/util/Map;ILjava/lang/Object;)V
}

public final class com/parsely/parselyandroid/ParselyVideoMetadata : com/parsely/parselyandroid/ParselyMetadata {
public fun <init> (Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/util/Calendar;I)V
public synthetic fun <init> (Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/util/Calendar;IILkotlin/jvm/internal/DefaultConstructorMarker;)V
}

5 changes: 5 additions & 0 deletions parsely/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode

plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'org.jetbrains.kotlinx.kover'
id 'org.jetbrains.kotlinx.binary-compatibility-validator'
}

ext {
Expand Down Expand Up @@ -30,6 +32,9 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildFeatures {
buildConfig = false
}
packagingOptions {
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/LICENSE'
Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pluginManagement {
id 'com.android.library' version gradle.ext.agpVersion
id 'org.jetbrains.kotlin.android' version '1.9.10'
id 'org.jetbrains.kotlinx.kover' version '0.7.4'
id 'org.jetbrains.kotlinx.binary-compatibility-validator' version '0.14.0'
}

repositories {
Expand Down

0 comments on commit 12607a9

Please sign in to comment.