-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.gradle.kts
100 lines (86 loc) · 2.4 KB
/
build.gradle.kts
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
import java.time.Year
plugins {
id("local.gwt-library")
id("local.gwt-test")
id("local.maven-publish")
id("net.ltgt.errorprone") version "1.1.1"
id("com.diffplug.gradle.spotless") version "3.30.0"
id("org.jlleitschuh.gradle.ktlint") version "9.2.1"
id("com.github.hierynomus.license") version "0.15.0"
}
buildscript {
dependencyLocking {
lockAllConfigurations()
lockMode.set(LockMode.STRICT)
}
}
allprojects {
dependencyLocking {
lockAllConfigurations()
lockMode.set(LockMode.STRICT)
}
}
tasks {
register("allDependencies") {
dependsOn("dependencies", subprojects.map { ":${it.name}:dependencies" })
}
}
group = "org.gwtproject.event"
dependencies {
testImplementation("junit:junit:4.13")
}
gwtTest {
moduleName.set("org.gwtproject.event.Event")
gwtVersion.set("2.9.0")
}
// Code style
allprojects {
apply(plugin = "com.github.hierynomus.license")
license {
header = rootProject.file("LICENSE.header")
encoding = "UTF-8"
skipExistingHeaders = true
mapping("java", "SLASHSTAR_STYLE")
exclude("**/META-INF/**")
(this as ExtensionAware).extra["year"] = Year.now()
(this as ExtensionAware).extra["name"] = "The GWT Project Authors"
}
}
repositories {
jcenter()
}
allprojects {
apply(plugin = "com.diffplug.gradle.spotless")
apply(plugin = "org.jlleitschuh.gradle.ktlint")
spotless {
java {
// local.gwt-test generates sources, we only want to check sources
targetExclude(fileTree(buildDir) { include("**/*.java") })
googleJavaFormat("1.7")
}
}
ktlint {
version.set("0.36.0")
enableExperimentalRules.set(true)
}
}
/*
configurations {
j2cl_transpiler
j2cl
}
dependencies {
j2cl_transpiler files('../../google/j2cl/bazel-bin/transpiler/java/com/google/j2cl/transpiler/J2clTranspiler_deploy.jar')
j2cl files('../../google/j2cl/bazel-bin/jre/java/jre.jar')
}
task transpile(type: JavaExec) {
inputs.files configurations.j2cl
inputs.files sourceSets.main.allJava
outputs.file "${buildDir}/libs/gwt-events.js.zip"
main = 'com.google.j2cl.transpiler.J2clTranspiler'
classpath = configurations.j2cl_transpiler
args = [ "-cp", configurations.j2cl.asPath, "-d", "${buildDir}/libs/gwt-events.js.zip" ] \
+ sourceSets.main.allJava
}
assemble.dependsOn transpile
*/