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

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