This repository was archived by the owner on Apr 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle
More file actions
86 lines (70 loc) · 2.63 KB
/
build.gradle
File metadata and controls
86 lines (70 loc) · 2.63 KB
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
buildscript {
ext.kotlinLoggingVersion = '1.6.24'
ext.logbackVersion = '1.2.3'
ext.junitVersion = '5.3.2'
ext.mockitoKotlinVersion = '1.6.0'
repositories { mavenCentral() }
}
plugins {
id "org.jetbrains.kotlin.jvm" version "1.3.21"
id "com.diffplug.gradle.spotless" version "3.16.0"
id 'org.web3j' version '4.1.3'
}
dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" }
compileKotlin { kotlinOptions.jvmTarget = "1.8" }
compileTestKotlin { kotlinOptions.jvmTarget = "1.8" }
allprojects {
apply plugin: 'java'
apply plugin: 'kotlin'
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url 'https://jitpack.io' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8",
"io.github.microutils:kotlin-logging:$kotlinLoggingVersion",
"ch.qos.logback:logback-classic:$logbackVersion",
"org.web3j:eea:4.3.0"
testCompile "org.junit.jupiter:junit-jupiter-engine:$junitVersion",
"com.nhaarman:mockito-kotlin:$mockitoKotlinVersion",
"ch.qos.logback:logback-classic:$logbackVersion",
"junit:junit:4.12"
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
dependsOn 'generateContractWrappers'
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
dependsOn 'generateTestContractWrappers'
}
sourceSets {
main.kotlin.srcDirs += "${web3j.generatedFilesBaseDir}/main/java"
test.kotlin.srcDirs += "${web3j.generatedFilesBaseDir}/test/java"
}
apply plugin: 'com.diffplug.gradle.spotless'
// see https://github.com/diffplug/spotless/tree/master/plugin-gradle
spotless {
kotlin {
// This path needs to be relative to each project
target fileTree('.') {
include '**/*.kt'
exclude '**/.gradle/**'
}
// see https://github.com/shyiko/ktlint#standard-rules
ktlint().userData(['max_line_length': '100', 'insert_final_newline': 'true'])
licenseHeaderFile "${rootDir}/gradle/spotless.kotlin.license" // License header file
}
groovyGradle {
target '*.gradle'
greclipse().configFile(rootProject.file('gradle/formatter.properties'))
endWithNewline()
paddedCell() // recommended hack to keep gradle files tidy
}
}
apply plugin: 'application'
application { mainClassName = 'org.web3j.eea.sample.ApplicationKt' }
}