This repository has been archived by the owner on Apr 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
74 lines (59 loc) · 1.93 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
plugins {
id 'maven'
id 'java'
id 'idea'
id 'com.adarshr.test-logger' version '1.7.0'
}
sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
jcenter()
mavenCentral()
maven {
// Aion dependencies
url "$rootProject.projectDir/lib"
}
}
ext {
aionVersion = '1.4'
web3jVersion = '4.5.0'
}
dependencies {
implementation "org.aion:avm-api:$aionVersion"
implementation "org.aion:avm-tooling:$aionVersion"
implementation "org.aion:avm-userlib:$aionVersion"
implementation "org.web3j:core:$web3jVersion"
implementation "org.web3j.aion:web3j-aion-avm:$version"
implementation "org.web3j.aion:web3j-aion-codegen:$version"
implementation "ch.qos.logback:logback-classic:1.2.3"
runtimeOnly "com.github.schnitker.logmanager:logmgr-logback:1.0.2"
testImplementation "junit:junit:4.12"
}
testlogger {
showStandardStreams = true
}
sourceSets {
main {
java {
srcDir {
"$project.buildDir/generated/source/web3j-aion/main/java"
}
}
}
}
task generateContractWrappers(type: JavaExec, group: 'aion', dependsOn: 'clean') {
classpath = sourceSets.main.runtimeClasspath
main = 'org.web3j.aion.codegen.AionGeneratorMain'
args '--abiFile', "$projectDir/hello-world-avm/target/hello-world-avm-${version}.abi",
'--binFile', "$projectDir/hello-world-avm/target/hello-world-avm-${version}.jar",
'--outputDir', "$project.buildDir/generated/source/web3j-aion/main/java",
'--package', 'org.web3j.aion.samples.generated'
}
compileJava {
source "$project.buildDir/generated/source/web3j-aion/main/java"
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
compileTestJava {
source "$project.buildDir/generated/source/web3j-aion/main/java"
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
dependsOn 'generateContractWrappers'
}