Skip to content

Commit

Permalink
preparing the library for release
Browse files Browse the repository at this point in the history
  • Loading branch information
baderkhane committed Oct 21, 2023
1 parent c6a81ec commit be84d70
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
14 changes: 12 additions & 2 deletions api-client-retrofit2/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

group 'fi.paytrail.sdk'
version '0.1.0'

buildscript {
repositories {
Expand All @@ -19,6 +17,7 @@ apply plugin: 'kotlinx-serialization'
apply plugin: 'maven-publish'
apply plugin: 'org.jlleitschuh.gradle.ktlint'


ktlint {
version.set(libs.versions.ktlint)
outputToConsole.set(true)
Expand Down Expand Up @@ -48,3 +47,14 @@ tasks.withType(KotlinCompile).configureEach {
freeCompilerArgs += "-Xopt-in=kotlinx.serialization.ExperimentalSerializationApi"
}
}

publishing {
publications {
apiClientRetrofit2(MavenPublication) {
from components.kotlin
groupId "com.github.paytrail"
artifactId "api-client-retrofit2"
version "v0.1.0-alpha"
}
}
}
23 changes: 22 additions & 1 deletion payment-sdk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
alias(libs.plugins.org.jetbrains.kotlin.android)
alias(libs.plugins.org.jetbrains.kotlin.parcelize)
alias(libs.plugins.jlleitschuh.ktlint)
id("maven-publish")
}

ktlint {
Expand Down Expand Up @@ -38,7 +39,7 @@ android {
// Flag to enable support for the new language APIs
isCoreLibraryDesugaringEnabled = true

// Sets Java compatibility to Java 8
// Sets Java compatibility to Java 17
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
Expand All @@ -58,6 +59,26 @@ android {
excludes += "/META-INF/{AL2.0,LGPL2.1,LICENSE.md,LICENSE-notice.md}"
}
}
android {
publishing {
singleVariant("release") {
withSourcesJar()
}
}
}
}
publishing {
publications {
register<MavenPublication>("release") {
groupId = "com.github.paytrail"
artifactId = "paytrail-android-sdk"
version = "v0.1.0-alpha"

afterEvaluate {
from(components["release"])
}
}
}
}

dependencies {
Expand Down

0 comments on commit be84d70

Please sign in to comment.