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

Слияние
author nickolay
date Wed, 05 Jun 2019 20:44:15 +0300
parents 1dc2fd263b90
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/build.gradle	Wed Jun 05 20:44:15 2019 +0300
@@ -0,0 +1,58 @@
+
+println "version: $version"
+
+String makePackageName(String group, String name, String ver) {
+    def sb = new StringBuilder();
+    if(group)
+        sb
+            .append('@')
+            .append(group)
+            .append('/');
+
+    sb.append(name);
+
+    if (ver)
+        sb.append('@').append(ver);
+
+    return sb.toString();
+}
+
+configurations {
+    compile
+    peer
+    dev
+}
+
+dependencies {
+    compile ":eslint:1.x || >=2.5.0 || 5.0.0 - 7.2.3"
+    compile (name: 'foo') {
+        ext.location = "http://some/package/location"
+    }
+    peer "dojo:core"
+}
+
+task prepare(type: Copy) {
+    from('src/js/')
+    from('.') {
+        include 'readme.md', 'license', 'history.md', 'package.json'
+    }
+    into(buildDir)
+}
+
+task installDeps {
+    configurations.compile.allDependencies.forEach { d ->
+        println makePackageName(d.group, d.name, d.version);
+        if(d.hasProperty('location')) {
+            println d.location
+        }
+    }
+}
+
+task build(dependsOn: prepare) {
+}
+
+task pack(dependsOn: build, type: Exec) {
+    workingDir = buildDir
+
+    commandLine 'npm', 'pack'
+}
\ No newline at end of file