Skip to content

Commit

Permalink
- Updating native poc with Henriks contribution + some small adaptat…
Browse files Browse the repository at this point in the history
…ions to make it play well with the bisq2 project local maven publishing work (#28)
  • Loading branch information
rodvar authored Nov 5, 2024
1 parent 624de6b commit f0637e0
Show file tree
Hide file tree
Showing 138 changed files with 41,322 additions and 19 deletions.
89 changes: 77 additions & 12 deletions pocs/android_only_m2_j17jars/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ protobuf {
artifact = "com.google.protobuf:protoc:3.25.4"
}

/* generateProtoTasks {
generateProtoTasks {
all().forEach { task ->
// Set the source of the .proto files to the "src/main/proto" directory
//task.source("src/main/proto")
Expand All @@ -21,7 +21,7 @@ protobuf {
} // Generates standard Protobuf Java classes
}
}
}*/
}

generateProtoTasks {
all().forEach { task ->
Expand Down Expand Up @@ -67,17 +67,11 @@ android {
jvmTarget = "17"
}


/* sourceSets {
getByName("main") {
java.srcDir("src/main/proto") // Specify the directory for proto files
java.srcDir("build/generated/source/proto/main/java") // Specify the Java output directory
}
}*/

sourceSets {
getByName("main") {
java.srcDir("src/main/proto") // Specify the directory for proto files
java.srcDir("src/main/resources")
java.srcDir("src/main/proto")
java.srcDir("build/generated/source/proto/main/java")
}
}

Expand All @@ -90,10 +84,22 @@ android {
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
// Exclude the conflicting META-INF files
excludes.add("META-INF/versions/9/OSGI-INF/MANIFEST.MF")
excludes.add("META-INF/DEPENDENCIES")

// pickFirsts.add("bisq/account/protobuf/Account\$Builder.class")
pickFirsts.add("**/protobuf/**/*.class")
}
}
}

//configurations {
// all {
// exclude(group = "com.google.protobuf")
// }
//}

dependencies {

implementation(libs.androidx.core.ktx)
Expand All @@ -113,7 +119,66 @@ dependencies {
debugImplementation(libs.androidx.ui.test.manifest)


implementation("bisq:common:2.1.1")
implementation("bisq:common:2.1.2")
implementation(libs.typesafe.config)
implementation(libs.annotations)

implementation("bisq:i18n:2.1.2")

implementation("bisq:persistence:2.1.2")

implementation("bisq:security:2.1.2")
implementation(libs.bouncycastle)
implementation(libs.bouncycastle.pg)
testImplementation(libs.apache.commons.lang)
implementation(libs.google.guava)

// network
implementation("network:network-identity:2.1.2")
implementation("network:socks5-socket-channel:2.1.2")
implementation("network:i2p:2.1.2")
implementation("network:network:2.1.2")
implementation(libs.chimp.jsocks)
implementation(libs.failsafe)
implementation(libs.apache.httpcomponents.httpclient)

//tor
implementation(libs.tukaani)
implementation(libs.chimp.jsocks)
implementation(libs.chimp.jtorctl)

//i2p
implementation(libs.bundles.i2p)

implementation("bisq:identity:2.1.2") // cannot be used until network dependencies are fixed. -> Could not find network:network-common:.

implementation("bisq:account:2.1.2") {
exclude(group = "com.google.protobuf", module = "*")
}

implementation("bisq:settings:2.1.2")

implementation("bisq:bonded-roles:2.1.2")
implementation(libs.google.gson)
implementation(libs.typesafe.config)
implementation(libs.bundles.jackson)

implementation("bisq:user:2.1.2")
implementation("bisq:contract:2.1.2")
implementation("bisq:offer:2.1.2")
implementation("bisq:trade:2.1.2")
implementation("bisq:support:2.1.2")
implementation("bisq:application:2.1.2")
implementation("bisq:chat:2.1.2")
implementation("bisq:presentation:2.1.2")

compileOnly(libs.lombok)
annotationProcessor(libs.lombok)

implementation(libs.slf4j.api)
implementation(libs.logback.core)
implementation(libs.logback.classic)

implementation(libs.protobuf.java)
implementation(libs.protobuf.gradle.plugin)
implementation("com.google.protobuf:protoc:3.25.4")
Expand Down
7 changes: 6 additions & 1 deletion pocs/android_only_m2_j17jars/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,9 @@

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile

-keep class bisq.** { *; }
-dontwarn bisq.**
-keep class com.google.protobuf.** { *; }
-dontwarn com.google.protobuf.**
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
android:theme="@style/Theme.Mobile"
tools:targetApi="31">
<activity
android:name=".MainActivity"
android:name="bisq.android.MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.Mobile">
Expand All @@ -25,4 +25,6 @@
</activity>
</application>

<uses-permission android:name="android.permission.INTERNET" />

</manifest>
Loading

0 comments on commit f0637e0

Please sign in to comment.