Skip to content

Commit

Permalink
Add billing client library and billing module
Browse files Browse the repository at this point in the history
  • Loading branch information
Pururun committed Sep 7, 2023
1 parent 827a84c commit b6dc58d
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 1 deletion.
1 change: 1 addition & 0 deletions android/buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ object Dependencies {
const val leakCanary = "com.squareup.leakcanary:leakcanary-android:${Versions.leakCanary}"
const val turbine = "app.cash.turbine:turbine:${Versions.turbine}"
const val mockkWebserver = "com.squareup.okhttp3:mockwebserver:${Versions.mockWebserver}"
const val billingClient = "com.android.billingclient:billing-ktx:${Versions.billingClient}"

object AndroidX {
const val appcompat = "androidx.appcompat:appcompat:${Versions.AndroidX.appcompat}"
Expand Down
1 change: 1 addition & 0 deletions android/buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ object Versions {
const val mockk = "1.13.3"
const val mockWebserver = "4.11.0"
const val turbine = "1.0.0"
const val billingClient = "6.0.1"

object Android {
const val compileSdkVersion = 33
Expand Down
40 changes: 40 additions & 0 deletions android/gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1483,6 +1483,16 @@
<sha256 value="56589abf965af58ea1d31c15d676fe0d62b9db92983fbdfe8e72c983ea577dbb" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.android.billingclient" name="billing" version="6.0.1">
<artifact name="billing-6.0.1.aar">
<sha256 value="740a22581265736a82b6a049d9e6c04364e79a0ff22d493a715f5f0e70a9206b" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.android.billingclient" name="billing-ktx" version="6.0.1">
<artifact name="billing-ktx-6.0.1.aar">
<sha256 value="5c243282d12cb21bbc2d7fea388d54183140f8d4b201a4380a0a6e8f3122a15e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.android.databinding" name="baseLibrary" version="8.1.0">
<artifact name="baseLibrary-8.1.0.jar">
<sha256 value="794113709dab21b06c262b3795e73cb708fbacae61715f34361e1af6237a1870" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -1986,6 +1996,21 @@
<sha256 value="9b586dc8eeeb4f601038e23ef8ffd6a1deeca1163276d02797b0d2b8f9764b62" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.android.datatransport" name="transport-api" version="3.0.0">
<artifact name="transport-api-3.0.0.aar">
<sha256 value="4e6983c0703b357df6f1c6ceacb1b5dfc2c5006a789c799fec2298b2b5337466" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.android.datatransport" name="transport-backend-cct" version="3.1.8">
<artifact name="transport-backend-cct-3.1.8.aar">
<sha256 value="e17edd1ef7fd475c90baa4e39422332f27087d34bcb46cb48ce86af9a54a612e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.android.datatransport" name="transport-runtime" version="3.1.8">
<artifact name="transport-runtime-3.1.8.aar">
<sha256 value="cb9353ef1791ae17097d878ca711e25a9c32cec9042adc49b00cadfee1a7290b" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.android.material" name="material" version="1.4.0">
<artifact name="material-1.4.0.aar">
<sha256 value="80a0e02abf8a8a8cbe5716e06ac80cd683840b9f5b0d2f19a2a279e47f2895ee" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -2077,6 +2102,21 @@
<sha256 value="9e6814cb71816988a4fd1b07a993a8f21bb7058d522c162b1de849e19bea54ae" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.firebase" name="firebase-encoders" version="17.0.0">
<artifact name="firebase-encoders-17.0.0.jar">
<sha256 value="282a5a703f9b7eb56508dde97ea918e95d73318b157050f457f7a86dca750150" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.firebase" name="firebase-encoders-json" version="18.0.0">
<artifact name="firebase-encoders-json-18.0.0.aar">
<sha256 value="80aece7e1ef58957ca2fc1957bc9208ec92a3a9528201331d3c63e3182570f97" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.firebase" name="firebase-encoders-proto" version="16.0.0">
<artifact name="firebase-encoders-proto-16.0.0.jar">
<sha256 value="293db96a0d1d43f033167881b638d8fde844e4e5495f5101cf52295765295e0e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.flatbuffers" name="flatbuffers-java" version="1.12.0">
<artifact name="flatbuffers-java-1.12.0.jar">
<sha256 value="3f8c088b4dd04a9858721f2e162508c94db0dd86f961e306ee63ef2eda871bf7" origin="Generated by Gradle"/>
Expand Down
33 changes: 33 additions & 0 deletions android/lib/billing/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
plugins {
id(Dependencies.Plugin.androidLibraryId)
id(Dependencies.Plugin.kotlinAndroidId)
}

android {
namespace = "net.mullvad.mullvadvpn.lib.billing"
compileSdk = Versions.Android.compileSdkVersion

defaultConfig {
minSdk = Versions.Android.minSdkVersion
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = Versions.jvmTarget
}

lint {
lintConfig = file("${rootProject.projectDir}/config/lint.xml")
abortOnError = true
warningsAsErrors = true
}
}

dependencies {
//Billing library
implementation(Dependencies.billingClient)
}
4 changes: 4 additions & 0 deletions android/lib/billing/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

</manifest>
3 changes: 2 additions & 1 deletion android/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ include(
":lib:resource",
":lib:talpid",
":lib:theme",
":lib:common-test"
":lib:common-test",
":lib:billing"
)
include(
":test",
Expand Down

0 comments on commit b6dc58d

Please sign in to comment.