-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
150 lines (132 loc) · 4.36 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/*
* Copyright 2022 ConsenSys Software Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software dis-
* tributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
plugins {
id('io.github.gradle-nexus.publish-plugin') version "1.3.0"
}
// Apply the java plugin to add support for Java
apply plugin: 'java'
// Apply eclipse plugin to add support for Eclipse
apply plugin: 'eclipse'
// Apply application plugin for generating start scripts
apply plugin: 'application'
// Stuff needed for publishing
apply plugin: 'maven-publish'
apply plugin: 'signing'
// ======================================================================
// Java Build
// ======================================================================
repositories {
// Use MavenCentral for resolving dependencies
mavenCentral()
}
group = 'org.whiley'
version = '0.3.30'
java {
withJavadocJar()
withSourcesJar()
}
// In this section you declare the dependencies for your production and test code
dependencies {
implementation("commons-cli:commons-cli:1.5.0")
implementation("org.json:org.json:chargebee-1.0")
implementation("org.apache.commons:commons-lang3:3.12.0")
//
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.0")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.7.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.0")
}
// ======================================================================
// Java Application
// ======================================================================
application {
mainClass = 'evmtools.Main'
applicationName = 'evmtools'
}
// A default task for convert reference tests into the trace format
// required for testing the Dafny evm.
task gen(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
mainClass = 'evmtools.Main'
// Ensure enough memory
jvmArgs '-Xmx4G','-Xss4m'
// arguments to pass to the application
args '-incremental'
args '-forks'
args 'Berlin,London,Shanghai,Cancun'
args '-dir'
args 'fixtures'
args '-out'
args 'output'
args '-excludes'
args 'excludes.txt'
args '-includes'
args 'includes.txt'
}
// ======================================================================
// Maven Central
// ======================================================================
nexusPublishing {
repositories {
sonatype {
username=project.property("user")
password=project.property("password")
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
artifactId='evmtools'
name = 'EVM Tools'
description = 'A tool for generating reference tests with full trace data.'
url = 'https://github.com/DavePearce/EvmTools'
scm {
url = 'https://github.com/DavePearce/EvmTools'
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'redjamjar'
name = 'David J. Pearce'
email = 'david.pearce@ecs.vuw.ac.nz'
}
}
}
}
}
}
signing {
useGpgCmd()
sign publishing.publications.mavenJava
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}