comparison core/build.gradle @ 31:40d2e49a7219

working on dependencies
author cin
date Wed, 27 Jun 2018 04:31:39 +0300
parents acdcdf1a8d21
children 1dc2fd263b90
comparison
equal deleted inserted replaced
29:acdcdf1a8d21 31:40d2e49a7219
1 1
2 println "version: $version" 2 println "version: $version"
3 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
4 task prepare(type: Copy) { 34 task prepare(type: Copy) {
5 from('src') 35 from('src/js/')
6 from('.') { 36 from('.') {
7 include 'readme.md', 'license', 'history.md', 'package.json' 37 include 'readme.md', 'license', 'history.md', 'package.json'
8 } 38 }
9 into(buildDir) 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 }
10 } 49 }
11 50
12 task build(dependsOn: prepare) { 51 task build(dependsOn: prepare) {
13 } 52 }
14 53