Skip to content

Commit 6d85278

Browse files
committed
updates build.gradle
1 parent 04175c3 commit 6d85278

1 file changed

Lines changed: 3 additions & 215 deletions

File tree

build.gradle

Lines changed: 3 additions & 215 deletions
Original file line numberDiff line numberDiff line change
@@ -1,218 +1,6 @@
1-
buildscript {
2-
repositories {
3-
mavenCentral()
4-
jcenter()
5-
}
6-
dependencies {
7-
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.3'
8-
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.2'
9-
}
10-
}
11-
plugins {
12-
id "org.sonarqube" version "2.6"
13-
}
14-
15-
group 'org.tron'
16-
version '1.0.0'
17-
18-
apply plugin: 'java'
19-
apply plugin: 'com.google.protobuf'
20-
apply plugin: 'application'
21-
apply plugin: 'checkstyle'
22-
apply plugin: 'com.github.johnrengelman.shadow'
23-
apply plugin: "jacoco"
24-
apply plugin: 'maven-publish'
25-
26-
jar.enabled = true
27-
shadowJar.enabled = true
28-
29-
sourceCompatibility = 1.8
30-
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
31-
mainClassName = 'org.tron.program.FullNode'
32-
33-
publishing {
34-
publications {
35-
mavenJava(MavenPublication) {
36-
from components.java
37-
artifact sourceJar
38-
}
39-
}
40-
repositories {
41-
mavenLocal()
42-
}
43-
}
44-
45-
task sourceJar(type: Jar, dependsOn: classes) {
46-
classifier 'sources'
47-
from sourceSets.main.allSource
48-
}
49-
50-
repositories {
51-
mavenLocal()
52-
mavenCentral()
53-
maven { url 'https://repo.spring.io/plugins-release' }
54-
}
55-
def versions = [
56-
checkstyle: '8.7',
57-
]
58-
59-
jacoco {
60-
toolVersion = "0.8.1"
61-
}
62-
63-
64-
configurations {
65-
checkstyleConfig
66-
67-
}
68-
69-
configurations.getByName('checkstyleConfig') {
70-
transitive = false
71-
}
72-
73-
static def isWindows() {
74-
return org.gradle.internal.os.OperatingSystem.current().isWindows()
75-
}
76-
77-
if (isWindows()) {
78-
ext {
79-
leveldbGroup = "org.ethereum"
80-
leveldbName = "leveldbjni-all"
81-
leveldbVersion = "1.18.3"
82-
}
83-
} else {
84-
ext {
85-
leveldbGroup = "org.fusesource.leveldbjni"
86-
leveldbName = "leveldbjni-all"
87-
leveldbVersion = "1.8"
88-
}
89-
}
90-
91-
task version(type: Exec) {
92-
commandLine 'bash', '-c', './ver.sh'
93-
}
94-
95-
dependencies {
96-
//local libraries
97-
compile fileTree(dir: 'libs', include: '*.jar')
98-
// end local libraries
99-
testCompile group: 'junit', name: 'junit', version: '4.12'
100-
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.13.0'
101-
testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '1.0.0.1'
102-
103-
testCompile group: 'org.testng', name: 'testng', version: '6.14.3'
104-
105-
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
106-
compile group: 'org.slf4j', name: 'jcl-over-slf4j', version: '1.7.25'
107-
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
108-
109-
// compile "org.projectlombok:lombok:1.16.18"
110-
compile group: 'org.projectlombok', name: 'lombok', version: '1.18.2'
111-
112-
compile group: 'commons-codec', name: 'commons-codec', version: '1.11'
113-
114-
compile "com.madgag.spongycastle:core:1.58.0.0"
115-
compile "com.madgag.spongycastle:prov:1.58.0.0"
116-
117-
compile group: 'com.google.guava', name: 'guava', version: '24.1-jre'
118-
119-
compile group: 'com.google.protobuf', name: 'protobuf-java', version: '3.4.0'
120-
compile group: 'com.google.protobuf', name: 'protobuf-java-util', version: '3.4.0'
121-
122-
compile "org.iq80.leveldb:leveldb:0.7"
123-
124-
compile group: 'org.rocksdb', name: 'rocksdbjni', version: '5.15.10'
125-
126-
compile group: leveldbGroup, name: leveldbName, version: leveldbVersion
127-
128-
compile "org.apache.commons:commons-collections4:4.0"
129-
130-
compile group: 'com.typesafe', name: 'config', version: '1.3.2'
131-
132-
compile "com.google.code.findbugs:jsr305:3.0.0"
133-
134-
compile "com.cedarsoftware:java-util:1.8.0"
135-
136-
compile "org.apache.commons:commons-lang3:3.4"
137-
138-
compile group: 'org.springframework', name: 'spring-context', version: '4.2.0.RELEASE'
139-
compile group: 'org.springframework', name: 'spring-tx', version: '4.2.0.RELEASE'
140-
141-
compile group: 'com.beust', name: 'jcommander', version: '1.72'
142-
143-
compile group: 'junit', name: 'junit', version: '4.12'
144-
145-
compile group: 'net.jcip', name: 'jcip-annotations', version: '1.0'
146-
147-
compile group: 'org.fusesource.jansi', name: 'jansi', version: '1.16'
148-
compile group: 'com.alibaba', name: 'fastjson', version: '1.2.44'
149-
150-
compile group: 'com.google.inject', name: 'guice', version: '4.1.0'
151-
152-
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.8.5'
153-
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.8.5'
154-
compile group: 'org.apache.commons', name: 'commons-math', version: '2.2'
155-
156-
compile group: 'joda-time', name: 'joda-time', version: '2.3'
157-
158-
compile group: 'io.dropwizard.metrics', name: 'metrics-core', version: '3.1.2'
159-
160-
// checkstyleConfig "com.puppycrawl.tools:checkstyle:${versions.checkstyle}"
161-
// google grpc
162-
compile group: 'io.grpc', name: 'grpc-netty', version: '1.14.0'
163-
compile group: 'io.grpc', name: 'grpc-protobuf', version: '1.14.0'
164-
compile group: 'io.grpc', name: 'grpc-stub', version: '1.14.0'
165-
// end google grpc
166-
167-
compile group: 'com.carrotsearch', name: 'java-sizeof', version: '0.0.5'
168-
169-
compile 'org.aspectj:aspectjrt:1.8.13'
170-
compile 'org.aspectj:aspectjweaver:1.8.13'
171-
compile 'org.aspectj:aspectjtools:1.8.13'
172-
compile 'com.googlecode.cqengine:cqengine:2.12.4'
173-
compile group: 'com.google.api.grpc', name: 'googleapis-common-protos', version: '0.0.3'
174-
175-
// http
176-
compile 'org.eclipse.jetty:jetty-server:9.4.11.v20180605'
177-
compile 'org.eclipse.jetty:jetty-servlet:9.4.11.v20180605'
178-
compile 'com.alibaba:fastjson:1.2.60'
179-
compile group: 'org.apache.httpcomponents', name:'httpasyncclient', version:'4.1.1'
180-
// end http
181-
182-
compile "io.vavr:vavr:0.9.2"
183-
compile group: 'org.pf4j', name: 'pf4j', version: '2.5.0'
184-
compile group: 'org.zeromq', name: 'jeromq', version: '0.5.0'
185-
186-
}
187-
188-
check.dependsOn 'lint'
189-
190-
//checkstyle {
191-
// toolVersion = "${versions.checkstyle}"
192-
// config = resources.text.fromArchiveEntry(configurations.checkstyleConfig, 'google_checks.xml')
193-
//
194-
//}
195-
checkstyle {
196-
toolVersion = "${versions.checkstyle}"
197-
configFile = file("config/checkstyle/checkStyleAll.xml")
198-
}
199-
200-
201-
checkstyleMain {
202-
source = 'src/main/java'
203-
}
204-
205-
task lint(type: Checkstyle) {
206-
// Cleaning the old log because of the creation of the new ones (not sure if totaly needed)
207-
delete fileTree(dir: "${project.rootDir}/app/build/reports")
208-
source 'src'
209-
include '**/*.java'
210-
exclude 'main/gen/**'
211-
exclude 'test/**'
212-
// empty classpath
213-
classpath = files()
214-
//Failing the build
215-
ignoreFailures = false
1+
allprojects {
2+
version = "1.0.0"
3+
apply plugin: "java"
2164
}
2175

2186
subprojects {

0 commit comments

Comments
 (0)