Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PeerAI #171

Closed
wants to merge 2 commits into from
Closed
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
2 changes: 2 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ dependencies {
implementation project(':valuetransfer')
implementation project(':atomic-swap')
implementation project(':literaturedao')
implementation project(':peerai')

implementation project(':detoks')
api(project(':common')) {
exclude group: 'net.java.dev.jna'
Expand Down
11 changes: 11 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,17 @@
android:screenOrientation="portrait"
android:theme="@style/Theme.MusicDaoTheme"></activity>


<activity
android:name="nl.tudelft.trustchain.peerai.PeerAIActivity"
android:exported="true"
android:label="PeerAI App"
android:parentActivityName=".ui.dashboard.DashboardActivity"
android:screenOrientation="portrait"


></activity>

<activity
android:name="nl.tudelft.trustchain.literaturedao.LiteratureDaoActivity"
android:exported="true"
Expand Down
16 changes: 16 additions & 0 deletions app/src/main/java/nl/tudelft/trustchain/app/AppDefinition.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ import nl.tudelft.trustchain.trader.ui.TrustChainTraderActivity
import nl.tudelft.trustchain.valuetransfer.ValueTransferMainActivity
import nl.tudelft.trustchain.voting.VotingActivity
import nl.tudelft.trustchain.detoks.DeToksActivity
import nl.tudelft.trustchain.peerai.PeerAIActivity





enum class AppDefinition(
@DrawableRes val icon: Int,
Expand Down Expand Up @@ -134,4 +139,15 @@ enum class AppDefinition(
R.color.green,
LiteratureDaoActivity::class.java
),


PeerAi(
R.drawable.ic_book_hover_over_hand,
"PeerAI",
R.color.green,
PeerAIActivity::class.java
)



}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ buildscript {
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jlleitschuh.gradle:ktlint-gradle:$ktlint_gradle_version"
classpath "com.squareup.sqldelight:gradle-plugin:$sqldelight_version"
Expand Down
4 changes: 2 additions & 2 deletions gossipML/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ dependencies {

// Cryptocurrency integration
implementation('org.bitcoinj:bitcoinj-core:0.15.10')
implementation 'org.knowm.xchange:xchange-parent:5.0.1'
implementation 'org.knowm.xchange:xchange-binance:5.0.1'
//implementation 'org.knowm.xchange:xchange-parent:5.0.1'
//implementation 'org.knowm.xchange:xchange-binance:5.0.1'

// Testing
testImplementation 'junit:junit:4.12'
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
4 changes: 2 additions & 2 deletions musicdao/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ dependencies {
// Cryptocurrency integration
implementation 'org.bitcoinj:bitcoinj-core:0.15.10'
// implementation 'com.google.guava:guava:29.0-android'
implementation 'org.knowm.xchange:xchange-parent:5.0.1'
implementation 'org.knowm.xchange:xchange-binance:5.0.1'
//implementation 'org.knowm.xchange:xchange-parent:5.0.1'
//implementation 'org.knowm.xchange:xchange-binance:5.0.1'

// Crypto library for testing
testImplementation "com.goterl:lazysodium-java:5.1.4"
Expand Down
1 change: 1 addition & 0 deletions peerai/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
65 changes: 65 additions & 0 deletions peerai/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'org.jetbrains.kotlin.plugin.serialization'
id 'kotlin-android-extensions'
}
apply plugin: 'kotlinx-serialization'

android {
compileSdkVersion 33
defaultConfig {
minSdkVersion 22
targetSdkVersion 33

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
namespace 'nl.tudelft.trustchain.peerai'
}

dependencies {
// Other classpath declarations
implementation project(':common')
api project(':common')

implementation 'org.apache.commons:commons-text:1.9'
implementation 'com.google.code.gson:gson:2.8.8'
// ML

implementation 'com.github.haifengl:smile-kotlin:3.0.1'

implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.3'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

implementation 'com.squareup.picasso:picasso:2.8'

}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions.freeCompilerArgs += [
"-opt-in=kotlin.Experimental,kotlin.ExperimentalUnsignedTypes",
]
}
21 changes: 21 additions & 0 deletions peerai/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package nl.tudelft.trustchain.peerai

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("nl.tudelft.trustchain.peerai", appContext.packageName)
}
}
7 changes: 7 additions & 0 deletions peerai/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:theme="@style/AppTheme" >
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_INTERNAL_STORAGE" />

</manifest>
Loading
Loading