apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'application'

mainClassName = 'com.alphawallet.scripttool.ScriptTool'

repositories {
    google()
    jcenter()
    mavenCentral()
    maven { url 'https://jitpack.io' }
    maven { url 'https://plugins.gradle.org/m2/' }
}

version = '0.1' // current tool for demonstration only

sourceCompatibility = 17
targetCompatibility = 17

dependencies {
    //implementation 'org.web3j:core:4.9.8'
    implementation files('../app/libs/abi-4.9.8.jar')
    implementation files('../app/libs/core-4.9.8.jar')
    implementation files('../app/libs/crypto-4.9.8.jar')
    implementation files('../app/libs/utils-4.9.8.jar')

    implementation 'com.squareup.okhttp3:okhttp:4.12.0'
    implementation 'io.reactivex.rxjava2:rxjava:2.2.21'
    testImplementation 'junit:junit:4.12'
    implementation project(path: ':lib')
    // To avoid any kind of class conflicts and logger conflicts, 
    // JDeferred does not include any logger libraries. Providing one here.
    implementation 'org.slf4j:slf4j-nop:1.7.25'
}

run {
    args = ["-tokenscript", "fifa.tsml", "-address", "0x901dbb9771d30124bd25b2f86ef4d8c6c135d948"]
    doFirst {
        assert file("fifa.tsml").exists() : "Need a tokenscript to test this functionality. Run this:\n curl -O http://repo.tokenscript.org/aw.app/2019/10/fifa.tsml\nto get it"
    }
}

task wrapper(type: Wrapper) {
    gradleVersion = '7.4.2'
}
