Skip to content
Draft
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
2,308 changes: 2,308 additions & 0 deletions platforms/android/checkout-protocol/api/checkout-protocol.api

Large diffs are not rendered by default.

169 changes: 169 additions & 0 deletions platforms/android/checkout-protocol/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
import io.gitlab.arturbosch.detekt.Detekt
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile

plugins {
id 'signing'
id 'maven-publish'
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'org.jetbrains.kotlin.plugin.serialization'
id 'io.gitlab.arturbosch.detekt'
}

def versionName = "4.0.0-alpha.1"

ext {
kotlin_stdlib_version = '2.0.21'
kotlin_serialization_version = '1.7.3'

junit_version = '4.13.2'
robolectric_version = '4.16.1'
assertj_version = '3.27.7'
detekt_formatting_version = '1.23.8'
}

android {
namespace = 'com.shopify.checkoutkit.protocol'
compileSdk = 36

defaultConfig {
minSdk = 23
versionCode = 1
versionName

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

aarMetadata {
minCompileSdk = 35
}
}

lint {
checkDependencies = true
warningsAsErrors = true
warning 'LintBaseline'
informational 'AndroidGradlePluginVersion'
}

buildTypes {
release {
minifyEnabled false
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
testOptions {
unitTests.includeAndroidResources = true
unitTests.all {
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
outputs.upToDateWhen { false }
showStandardStreams = true
}
}
}
publishing {
singleVariant("release") {
withSourcesJar()
withJavadocJar()
}
}
}

tasks.withType(KotlinJvmCompile).configureEach {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_11)
apiVersion.set(KotlinVersion.KOTLIN_2_0)
languageVersion.set(KotlinVersion.KOTLIN_2_0)
if (!name.contains("Test")) {
freeCompilerArgs.add("-Xexplicit-api=strict")
}
}
}

dependencies {
detektPlugins "io.gitlab.arturbosch.detekt:detekt-formatting:$detekt_formatting_version"

testImplementation "junit:junit:$junit_version"
testImplementation "org.robolectric:robolectric:$robolectric_version"
testImplementation "org.assertj:assertj-core:$assertj_version"

implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_stdlib_version"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlin_serialization_version"
}

signing {
def signingKeyId = findProperty("signingKeyId")
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
if (signingKey) {
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign publishing.publications
}
}

detekt {
buildUponDefaultConfig = true
config.setFrom('../lib/detekt.config.yml')
autoCorrect = true
}

// Models.kt is generated from UCP JSON Schemas - exclude it from static analysis.
tasks.withType(Detekt).configureEach {
exclude('**/Models.kt')
}

project.afterEvaluate {
publishing {
publications {
release(MavenPublication) {
pom {
name = "CheckoutProtocol"
description = "Shopify Checkout Kit's typed Embedded Checkout Protocol models and client."
url = "https://github.com/Shopify/checkout-kit"
groupId = "com.shopify"
artifactId = "checkout-protocol"
version = versionName

licenses {
license {
name = "MIT"
url = "https://opensource.org/licenses/MIT"
}
}

developers {
developer {
name = "Shopify Inc."
}
}

scm {
connection = "https://github.com/Shopify/checkout-kit.git"
developerConnection = "https://github.com/Shopify/checkout-kit.git"
url = "https://github.com/Shopify/checkout-kit.git"
}
}

afterEvaluate {
from components.release
}
}
}

repositories {
maven {
name = 'ossrh-staging-api'
url = "https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/"
credentials {
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_PASSWORD")
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<manifest />
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package com.shopify.checkoutkit
* Implement this interface to handle Embedded Checkout Protocol (ECP) messages beyond
* the built-in methods handled natively by the SDK.
*
* Register an implementation via [ShopifyCheckoutKit.present].
* Register an implementation with a host SDK that accepts ECP clients.
*/
public interface CheckoutCommunicationClient {
/**
Expand Down
Loading
Loading