Skip to content
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
19 changes: 8 additions & 11 deletions libpretixnfc-android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// NOTE: update versions in settings.gradle!
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'org.jetbrains.kotlin.kapt'
alias(nfcLibs.plugins.android.library)
alias(nfcLibs.plugins.kotlin.android)
}

android {
Expand Down Expand Up @@ -40,11 +38,10 @@ repositories {
}

dependencies {
def kotlin_version = "1.9.23" // update in settings.gradle too
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.10.0'
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3"
implementation nfcLibs.kotlin.stdlib
implementation nfcLibs.core.ktx
implementation nfcLibs.kotlinx.coroutines.core
implementation nfcLibs.kotlinx.coroutines.android

implementation files('libs/acssmc-1.1.8.jar')

Expand All @@ -54,6 +51,6 @@ dependencies {
implementation(project(':libpretixsync')) {
transitive = false
}
implementation 'io.sentry:sentry-android:8.18.0'
implementation 'com.madgag.spongycastle:prov:1.58.0.0'
implementation nfcLibs.sentry.android
implementation nfcLibs.prov
}
19 changes: 19 additions & 0 deletions libpretixnfc-android/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[versions]
agp = "8.13.0"
kotlin = "2.2.21"
coreKtx = "1.10.0"
kotlinxCoroutinesCore = "1.7.3"
prov = "1.58.0.0"
sentryAndroid = "8.18.0"

[libraries]
core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinxCoroutinesCore" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutinesCore" }
prov = { module = "com.madgag.spongycastle:prov", version.ref = "prov" }
sentry-android = { module = "io.sentry:sentry-android", version.ref = "sentryAndroid" }

[plugins]
android-library = { id = "com.android.library", version.ref = "agp" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
11 changes: 6 additions & 5 deletions libpretixnfc-android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ pluginManagement {
}
}

// workaround: plugin definition with version here, so a standalone build is possible
// but building it inside the multi module project doesn't exit with "unknown version already on classpath" error
plugins {
id 'com.android.library' version '8.4.2' apply false
id 'org.jetbrains.kotlin.android' version '1.9.23' apply false
dependencyResolutionManagement {
versionCatalogs {
nfcLibs {
from(files("gradle/libs.versions.toml"))
}
}
}

rootProject.name = 'eu.pretix.libpretixnfc-android'
Expand Down
8 changes: 4 additions & 4 deletions libpretixnfc/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "java-library"
id "jacoco"
id "org.jetbrains.kotlin.jvm"
alias(nfcCoreLibs.plugins.kotlin.jvm)
}

repositories {
Expand All @@ -28,7 +28,7 @@ jacocoTestReport {
check.dependsOn jacocoTestReport

dependencies {
implementation "org.bouncycastle:bcpkix-jdk15to18:1.70"
implementation "org.bouncycastle:bcprov-jdk15to18:1.70"
testImplementation "junit:junit:4.13.2"
implementation nfcCoreLibs.bcpkix.jdk15to18
implementation nfcCoreLibs.bcprov.jdk15to18
testImplementation nfcCoreLibs.junit
}
12 changes: 12 additions & 0 deletions libpretixnfc/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[versions]
bcpkixJdk15to18 = "1.70"
junit = "4.13.2"
kotlin = "2.2.21"

[libraries]
bcpkix-jdk15to18 = { module = "org.bouncycastle:bcpkix-jdk15to18", version.ref = "bcpkixJdk15to18" }
bcprov-jdk15to18 = { module = "org.bouncycastle:bcprov-jdk15to18", version.ref = "bcpkixJdk15to18" }
junit = { module = "junit:junit", version.ref = "junit" }

[plugins]
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
9 changes: 8 additions & 1 deletion libpretixnfc/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ pluginManagement {

plugins {
id "org.gradle.toolchains.foojay-resolver-convention" version "1.0.0"
id "org.jetbrains.kotlin.jvm" version "2.2.21" apply false
}

dependencyResolutionManagement {
versionCatalogs {
nfcCoreLibs {
from(files('gradle/libs.versions.toml'))
}
}
}

rootProject.name = "eu.pretix.libpretixnfc"
Loading