-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
96 lines (75 loc) · 1.92 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
buildscript {
repositories {
maven { url "http://repo.eddyson.loc/libs-release" }
}
dependencies {
classpath "de.eddyson:tapestry-react:0.30.1"
}
}
plugins {
id "com.jfrog.bintray" version "1.7.3"
}
description = "VanillaJS t5/core/dom implementation"
group = "de.eddyson"
version = "0.0.29"
apply plugin: 'groovy'
apply plugin: 'maven'
def versions= [
tapestry: '5.4.3',
slf4j: '1.7.25',
// test scopes
spock: '1.1-groovy-2.4',
selenium: '2.53.1'
]
repositories {
jcenter()
}
sourceCompatibility = '1.7'
task sourceJar(type: Jar) {
dependsOn classes
classifier "sources"
from sourceSets.main.allSource
}
artifacts {
archives sourceJar
}
dependencies {
compile "org.apache.tapestry:tapestry-core:$versions.tapestry"
}
jar {
manifest { attributes 'Tapestry-Module-Classes': 'de.eddyson.tapestry.dom.vanilla.modules.TapestryDomVanillaModule' }
}
allprojects {
processResources {
def compilerInputs = [:]
filesMatching(['**/*.jsm']){
def relativePath = it.path
def relativeOutputPath = relativePath.replaceAll(/m?$/, '')
compilerInputs.put(relativeOutputPath, it.file.text)
it.exclude()
}
doLast {
def compiler = new de.eddyson.tapestry.react.StandaloneCompiler()
def outputs = compiler.compile(compilerInputs)
outputs.each { k,v->
def target = new File(destinationDir, k)
target.parentFile.mkdirs()
// also return the exports from the AMD module
def hackedContent = v.replaceAll(/(?m)^}\);$/, " return exports.default;\n});")
target.text = hackedContent
}
}
}
}
bintray {
user = 'fooberger'
key = System.env.bintrayAPIKey
configurations = ['archives']
publish = true
pkg {
repo = 'maven'
name = 'de.eddyson:tapestry-dom-vanilla'
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/eddyson-de/tapestry-dom-vanilla'
}
}