-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
92 lines (83 loc) · 2.97 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
apply plugin: 'java-library'
apply plugin: 'eclipse'
apply plugin: 'java-gradle-plugin'
repositories {
maven {
url 'https://repository.jsweet.org/artifactory/libs-release-local'
content {
includeGroup 'org.jsweet'
includeGroup 'org.jsweet.ext'
}
}
maven { url 'https://plugins.gradle.org/m2/' }
}
Properties props = new Properties()
new File(projectDir.parentFile, 'gradle.properties').withInputStream {
props.load(it)
}
dependencies {
// node.js
api 'com.github.eirslett:frontend-maven-plugin:1.12.1' // JitPack HEAD as of 04/23/2020
// https://github.com/palantir/docker-compose-rule
api "com.palantir.docker.compose:docker-compose-rule-core:${props.VER_PALANTIR_DOCKER_COMPOSE}"
api "com.palantir.docker.compose:docker-compose-rule-junit4:${props.VER_PALANTIR_DOCKER_COMPOSE}"
// https://jdbc.postgresql.org/documentation/changelog.html
implementation "org.postgresql:postgresql:${props.VER_POSTGRESQL_DRIVER}"
// jooq codegen
api 'org.jooq:jooq-codegen:3.14.9'
// db migration
api "org.flywaydb:flyway-core:${props.VER_FLYWAY}"
// jsweet ts2java
implementation "com.jsoniter:jsoniter:${props.VER_JSONITER}"
implementation 'org.jsweet:jsweet-transpiler:3.1.0'
//implementation files("${System.properties['java.home']}/../lib/tools.jar")
// java8 utilities
implementation 'com.diffplug.durian:durian-core:1.2.0'
// hashes folders into a single ObjectId
implementation "org.eclipse.jgit:org.eclipse.jgit:${props.VER_JGIT}"
// gradle utilities
implementation 'com.diffplug.gradle:goomph:3.35.0'
testImplementation "junit:junit:${props.VER_JUNIT}"
testImplementation "org.assertj:assertj-core:${props.VER_ASSERTJ}"
}
// if we're not in CI, grab all source
String HEROKU_ENV_VAR = 'STACK' // https://devcenter.heroku.com/articles/buildpack-api#stacks
String CI_ENV_VAR = 'CI' // https://circleci.com/docs/1.0/environment-variables/#basics
def keys = System.getenv().keySet()
if (!keys.contains(HEROKU_ENV_VAR) && !keys.contains(CI_ENV_VAR)) {
// uncomment to generate eclipse project
// (adds tons of noise to continuous build)
compileJava.dependsOn(tasks.getByName('eclipse'))
}
eclipse { project { name = 'mytake-buildSrc' } }
gradlePlugin {
plugins {
flywayJooq {
id = 'org.mytake.gradle.flywayjooq'
implementationClass = 'org.mytake.gradle.flywayjooq.FlywayJooqPlugin'
}
node {
id = 'org.mytake.gradle.node'
implementationClass = 'org.mytake.gradle.node.NodePlugin'
}
jsoniterCodegen {
id = 'org.mytake.gradle.jsonitercodegen'
implementationClass = 'org.mytake.gradle.jsonitercodegen.JsoniterCodegenPlugin'
}
jsweetRepo {
id = 'org.mytake.gradle.jsweetrepo'
implementationClass = 'org.mytake.gradle.jsweet.JSweetRepoPlugin'
}
jsweetCodegen {
id = 'org.mytake.gradle.jsweetcodegen'
implementationClass = 'org.mytake.gradle.jsweet.JSweetPlugin'
}
}
}
// reproducible buildSrc jar for travis cache
project.tasks.withType(AbstractArchiveTask) {
preserveFileTimestamps = false
reproducibleFileOrder = true
dirMode = 0775
fileMode = 0664
}