comparison core/build.gradle @ 34:27e8e9e38e07 default tip

Слияние
author nickolay
date Wed, 05 Jun 2019 20:44:15 +0300
parents 1dc2fd263b90
children
comparison
equal deleted inserted replaced
33:8af8e840dd49 34:27e8e9e38e07
1
2 println "version: $version"
3
4 String makePackageName(String group, String name, String ver) {
5 def sb = new StringBuilder();
6 if(group)
7 sb
8 .append('@')
9 .append(group)
10 .append('/');
11
12 sb.append(name);
13
14 if (ver)
15 sb.append('@').append(ver);
16
17 return sb.toString();
18 }
19
20 configurations {
21 compile
22 peer
23 dev
24 }
25
26 dependencies {
27 compile ":eslint:1.x || >=2.5.0 || 5.0.0 - 7.2.3"
28 compile (name: 'foo') {
29 ext.location = "http://some/package/location"
30 }
31 peer "dojo:core"
32 }
33
34 task prepare(type: Copy) {
35 from('src/js/')
36 from('.') {
37 include 'readme.md', 'license', 'history.md', 'package.json'
38 }
39 into(buildDir)
40 }
41
42 task installDeps {
43 configurations.compile.allDependencies.forEach { d ->
44 println makePackageName(d.group, d.name, d.version);
45 if(d.hasProperty('location')) {
46 println d.location
47 }
48 }
49 }
50
51 task build(dependsOn: prepare) {
52 }
53
54 task pack(dependsOn: build, type: Exec) {
55 workingDir = buildDir
56
57 commandLine 'npm', 'pack'
58 }