From 7832d916626f61b7d07e6cca4d7f113832f9cc2b Mon Sep 17 00:00:00 2001 From: Rowdy Mitchell Chotkan Date: Mon, 26 Feb 2024 15:53:10 +0100 Subject: [PATCH] Fix import types --- app/build.gradle | 17 +++-------------- common/build.gradle | 21 +++++++-------------- currencyii/build.gradle | 10 +++++----- debug/build.gradle | 2 +- eurotoken/build.gradle | 21 ++++++++------------- freedomOfComputing/build.gradle | 13 +++++++------ musicdao/build.gradle | 28 ++++++++++++---------------- peerai/build.gradle | 6 ++---- valuetransfer/build.gradle | 27 ++++++++++++--------------- 9 files changed, 57 insertions(+), 88 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index f8fbd0d63..520b4746d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -116,18 +116,9 @@ dependencies { implementation project(':eurotoken') implementation project(':valuetransfer') implementation project(':peerai') - api(project(':common')) { - exclude group: 'net.java.dev.jna' - } - api(project(':common-ethereum')) { - exclude group: 'net.java.dev.jna' - } - api(project(':currencyii')) { - exclude group: 'net.java.dev.jna' - } - api(project(':musicdao')) { - exclude group: 'net.java.dev.jna' - } + implementation project(':common') + implementation project(':currencyii') + implementation project(':musicdao') // AndroidX implementation "androidx.datastore:datastore-preferences:1.0.0" @@ -167,8 +158,6 @@ dependencies { // Room implementation "androidx.room:room-runtime:$room_version" - annotationProcessor "androidx.room:room-compiler:$room_version" - kapt("androidx.room:room-compiler:$room_version") // Transitive dependencies androidTestImplementation 'androidx.test:monitor:1.6.1' diff --git a/common/build.gradle b/common/build.gradle index 4b6bfdcff..a8f3161f4 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -78,26 +78,23 @@ repositories { } dependencies { - api(project(':ipv8-android')) { - exclude group: 'net.java.dev.jna' - exclude group: 'org.bouncycastle' - } + implementation project(':ipv8-android') - api 'com.google.guava:guava:30.0-android' + implementation 'com.google.guava:guava:30.0-android' // AndroidX - implementation 'androidx.appcompat:appcompat:1.1.0' + api 'androidx.appcompat:appcompat:1.1.0' + api 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.core:core-ktx:1.9.0' - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation "androidx.navigation:navigation-fragment-ktx:$nav_version" implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version" implementation 'androidx.databinding:viewbinding:8.2.2' // QR - implementation 'com.journeyapps:zxing-android-embedded:4.3.0' + api 'com.journeyapps:zxing-android-embedded:4.3.0' // Material - implementation 'com.google.android.material:material:1.1.0' + api 'com.google.android.material:material:1.1.0' // Kotlin implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" @@ -105,7 +102,7 @@ dependencies { implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation group: 'org.bitcoinj', name: 'bitcoinj-core', version: '0.15.10' + api group: 'org.bitcoinj', name: 'bitcoinj-core', version: '0.15.10' api project(':geth-android') // BitTorrent @@ -117,14 +114,10 @@ dependencies { // Testing testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test.ext:junit:1.1.5' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version" testImplementation "io.mockk:mockk:$mockk_version" - testImplementation 'org.json:json:20190722' testImplementation "app.cash.sqldelight:sqlite-driver:$sqldelight_version" testImplementation "com.goterl:lazysodium-java:5.1.4" - annotationProcessor "androidx.room:room-compiler:$room_version" // Transitive dependencies api 'androidx.fragment:fragment:1.5.4' diff --git a/currencyii/build.gradle b/currencyii/build.gradle index 6ab37b2bf..bb3ee3364 100644 --- a/currencyii/build.gradle +++ b/currencyii/build.gradle @@ -52,17 +52,17 @@ android { dependencies { implementation project(':ipv8-android') - implementation project(':common') + api project(':common') // AndroidX + api 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.core:core-ktx:1.9.0' - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation "androidx.recyclerview:recyclerview:1.1.0" implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version" // Material - implementation 'com.google.android.material:material:1.1.0' + api 'com.google.android.material:material:1.1.0' // Kotlin implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" @@ -76,10 +76,10 @@ dependencies { androidTestImplementation 'androidx.test.ext:junit:1.1.5' // BitcoinJ - implementation 'org.bitcoinj:bitcoinj-core:0.15.10' + api 'org.bitcoinj:bitcoinj-core:0.15.10' // GSON - implementation 'com.google.code.gson:gson:2.8.6' + api 'com.google.code.gson:gson:2.8.6' // Transitive dependencies androidTestImplementation 'androidx.test:monitor:1.6.1' diff --git a/debug/build.gradle b/debug/build.gradle index 1fbc0327f..0bf076f65 100644 --- a/debug/build.gradle +++ b/debug/build.gradle @@ -43,7 +43,7 @@ android { } dependencies { - implementation project(':common') + api project(':common') // AndroidX implementation 'androidx.core:core-ktx:1.9.0' diff --git a/eurotoken/build.gradle b/eurotoken/build.gradle index de9d8c50d..539e80bee 100644 --- a/eurotoken/build.gradle +++ b/eurotoken/build.gradle @@ -51,37 +51,32 @@ android { } dependencies { + api project(':common') - implementation project(':common') - - implementation fileTree(dir: "libs", include: ["*.jar"]) + // AndroidX + api 'androidx.constraintlayout:constraintlayout:2.0.1' + api 'androidx.recyclerview:recyclerview:1.1.0' + api 'com.github.MattSkala:recyclerview-itemadapter:0.4' implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'androidx.constraintlayout:constraintlayout:2.0.1' - implementation 'androidx.recyclerview:recyclerview:1.1.0' implementation "androidx.room:room-runtime:$room_version" - implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version" - implementation 'com.github.MattSkala:recyclerview-itemadapter:0.4' - // Material - implementation 'com.google.android.material:material:1.1.0' + api 'com.google.android.material:material:1.1.0' // Kotlin - implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + api "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" // Logging - implementation 'io.github.microutils:kotlin-logging:1.7.7' + api 'io.github.microutils:kotlin-logging:1.7.7' // Testing testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.5' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' - annotationProcessor "androidx.room:room-compiler:$room_version" // Transitive dependencies androidTestImplementation 'androidx.test:monitor:1.6.1' diff --git a/freedomOfComputing/build.gradle b/freedomOfComputing/build.gradle index 24cbf935e..cf25ac33b 100644 --- a/freedomOfComputing/build.gradle +++ b/freedomOfComputing/build.gradle @@ -46,6 +46,8 @@ android { } dependencies { + implementation project(':common') + // TODO fix direct import, this should rely on common. // BitTorrent implementation files('../common/libs/jlibtorrent-' + jlibtorrent_version + '.jar') @@ -54,17 +56,16 @@ dependencies { implementation files('../common/libs/jlibtorrent-android-x86-' + jlibtorrent_version + '.jar') implementation files('../common/libs/jlibtorrent-android-x86_64-' + jlibtorrent_version + '.jar') - implementation 'androidx.appcompat:appcompat:1.1.0' + api 'androidx.appcompat:appcompat:1.1.0' + api 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.core:core-ktx:1.9.0' - implementation 'com.google.android.material:material:1.1.0' - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + + api 'com.google.android.material:material:1.1.0' implementation 'io.github.microutils:kotlin-logging:1.7.7' testImplementation 'junit:junit:4.12' testImplementation "io.mockk:mockk:$mockk_version" testImplementation group: 'org.awaitility', name: 'awaitility', version: '3.0.0' - androidTestImplementation 'androidx.test.ext:junit:1.1.5' - implementation project(':common') // Kotlin implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" @@ -88,7 +89,7 @@ dependencies { tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { kotlinOptions.freeCompilerArgs += [ - "-opt-in=kotlin.RequiresOptIn" + "-opt-in=kotlin.RequiresOptIn" ] } diff --git a/musicdao/build.gradle b/musicdao/build.gradle index 1d89bed5c..9f33d4f50 100644 --- a/musicdao/build.gradle +++ b/musicdao/build.gradle @@ -75,13 +75,9 @@ android { } dependencies { + implementation project(':ipv8-android') implementation project(':common') - api(project(':ipv8-android')) { - exclude group: 'net.java.dev.jna' - exclude group: 'org.bouncycastle' - } - // TODO fix direct import, this should rely on common. // BitTorrent implementation files('../common/libs/jlibtorrent-' + jlibtorrent_version + '.jar') @@ -91,31 +87,31 @@ dependencies { implementation files('../common/libs/jlibtorrent-android-x86_64-' + jlibtorrent_version + '.jar') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.2.0' + api 'androidx.appcompat:appcompat:1.2.0' implementation 'com.google.android.material:material:1.3.0' // BitTorrent/Libtorrent libraries implementation 'com.turn:ttorrent-core:1.5' - implementation 'com.google.android.exoplayer:exoplayer-core:2.17.1' + api 'com.google.android.exoplayer:exoplayer-core:2.17.1' implementation 'com.google.android.exoplayer:exoplayer-ui:2.17.1' // Cryptocurrency integration - implementation 'org.bitcoinj:bitcoinj-core:0.15.10' + api 'org.bitcoinj:bitcoinj-core:0.15.10' // Testing testImplementation "io.mockk:mockk:$mockk_version" testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version" // Reading MP3 metadata - implementation 'com.mpatric:mp3agic:0.9.1' + api 'com.mpatric:mp3agic:0.9.1' // Integration with activities implementation 'androidx.activity:activity-compose:1.3.1' // Compose Material Design - implementation "androidx.compose.material:material:1.0.1" + api "androidx.compose.material:material:1.0.1" // Animations - implementation "androidx.compose.animation:animation:1.0.1" + api "androidx.compose.animation:animation:1.0.1" // Tooling support (Previews, etc.) implementation 'androidx.compose.ui:ui-tooling:1.0.1' // Integration with ViewModels @@ -128,19 +124,19 @@ dependencies { implementation "com.google.accompanist:accompanist-navigation-animation:0.29.1-alpha" // Room - implementation "androidx.room:room-runtime:$room_version" + api "androidx.room:room-runtime:$room_version" implementation("androidx.room:room-ktx:$room_version") annotationProcessor "androidx.room:room-compiler:$room_version" kapt("androidx.room:room-compiler:$room_version") // Hilt - implementation("com.google.dagger:hilt-android:$hilt_ver") - implementation("androidx.hilt:hilt-navigation-compose:1.0.0-alpha03") + api "com.google.dagger:hilt-android:$hilt_ver" + implementation "androidx.hilt:hilt-navigation-compose:1.0.0-alpha03" kapt("com.google.dagger:hilt-android-compiler:$hilt_ver") // GSON - implementation("com.google.code.gson:gson:2.8.9") - implementation("org.apache.commons:commons-csv:1.9.0") + api "com.google.code.gson:gson:2.8.9" + implementation "org.apache.commons:commons-csv:1.9.0" implementation "org.jetbrains.kotlin:kotlin-reflect:1.9.22" // Transitive dependencies diff --git a/peerai/build.gradle b/peerai/build.gradle index c9a3c0ccb..9b6171b18 100644 --- a/peerai/build.gradle +++ b/peerai/build.gradle @@ -40,17 +40,15 @@ android { } dependencies { - implementation project(':common') api project(':common') + api 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'com.google.code.gson:gson:2.8.8' implementation 'com.google.android.material:material:1.5.0' - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + implementation 'com.squareup.picasso:picasso:2.8' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.5' - implementation 'com.squareup.picasso:picasso:2.8' - // Transitive dependencies androidTestImplementation 'androidx.test:monitor:1.6.1' androidTestImplementation 'junit:junit:4.13.2' diff --git a/valuetransfer/build.gradle b/valuetransfer/build.gradle index 6e58b9c26..ec946fb39 100644 --- a/valuetransfer/build.gradle +++ b/valuetransfer/build.gradle @@ -65,20 +65,21 @@ android { } dependencies { - implementation project(':common') + api project(':common') + api project(':eurotoken') // AndroidX - implementation 'androidx.appcompat:appcompat:1.1.0' + api 'androidx.appcompat:appcompat:1.1.0' + api 'androidx.constraintlayout:constraintlayout:1.1.3' + api "androidx.recyclerview:recyclerview:1.1.0" implementation 'androidx.core:core-ktx:1.9.0' - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' - implementation "androidx.recyclerview:recyclerview:1.1.0" implementation "androidx.lifecycle:lifecycle-runtime:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version" // Material - implementation 'com.google.android.material:material:1.2.0' + api 'com.google.android.material:material:1.2.0' // Kotlin implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" @@ -89,10 +90,9 @@ dependencies { // Logging implementation 'io.github.microutils:kotlin-logging:1.7.7' - implementation 'com.github.MattSkala:recyclerview-itemadapter:0.4' + api 'com.github.MattSkala:recyclerview-itemadapter:0.4' implementation 'com.github.bumptech.glide:glide:4.11.0' implementation "androidx.room:room-runtime:$room_version" - implementation project(path: ':eurotoken') implementation 'com.google.android.gms:play-services-maps:18.2.0' implementation 'com.google.android.gms:play-services-location:21.1.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0' @@ -100,10 +100,9 @@ dependencies { // Testing testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.5' - annotationProcessor "androidx.room:room-compiler:$room_version" // Blocking dialog and top snacbkbar - implementation 'com.jaredrummler:blocking-dialog:1.0.0' + api 'com.jaredrummler:blocking-dialog:1.0.0' implementation 'com.github.Redman1037:TSnackBar:V2.0.0' // Passport onboarding @@ -114,13 +113,14 @@ dependencies { implementation 'com.google.android.gms:play-services-mlkit-text-recognition:16.0.0' implementation 'com.journeyapps:zxing-android-embedded:3.6.0' implementation 'com.github.mhshams:jnbis:1.1.0' + implementation 'net.sf.scuba:scuba-sc-android:0.0.20' implementation 'com.madgag.spongycastle:prov:1.58.0.0' // Zoom image - implementation 'com.jsibbold:zoomage:1.3.1' + api 'com.jsibbold:zoomage:1.3.1' // Side to confirm - implementation "com.ncorti:slidetoact:0.9.0" + api "com.ncorti:slidetoact:0.9.0" implementation "com.android.volley:volley:1.2.1" @@ -147,10 +147,7 @@ dependencies { implementation 'app.cash.sqldelight:coroutines-extensions:2.0.1' implementation 'com.google.mlkit:vision-common:16.0.0' implementation 'net.sf.scuba:scuba-smartcards:0.0.18' - implementation(project(':ipv8-android')) { - exclude group: 'net.java.dev.jna' - exclude group: 'org.bouncycastle' - } + implementation project(':ipv8-android') } tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {