changeset 32:1dc2fd263b90

Merge
author cin
date Wed, 27 Jun 2018 04:35:04 +0300
parents 40d2e49a7219 (diff) 2dfba21cd879 (current diff)
children 27e8e9e38e07
files core/build.gradle
diffstat 4 files changed, 55 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.vscode/settings.json	Wed Jun 27 04:35:04 2018 +0300
@@ -0,0 +1,3 @@
+{
+    "java.configuration.updateBuildConfiguration": "disabled"
+}
\ No newline at end of file
--- a/build.gradle	Wed Jun 27 02:46:14 2018 +0300
+++ b/build.gradle	Wed Jun 27 04:35:04 2018 +0300
@@ -1,2 +1,11 @@
+version = "${majorVersion}.${minorVersion}.${patchVersion}"
+if (suffixVersion) {
+    version += "-$suffixVersion"
+}
+
+subprojects {
+    version = rootProject.version
+}
+
 task build(type: Copy) {
 }
\ No newline at end of file
--- a/core/build.gradle	Wed Jun 27 02:46:14 2018 +0300
+++ b/core/build.gradle	Wed Jun 27 04:35:04 2018 +0300
@@ -1,15 +1,49 @@
-println "version: $project.version $foo"
+
+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('src/js/')
     from('.') {
         include 'readme.md', 'license', 'history.md', 'package.json'
     }
     into(buildDir)
+}
 
-    doLast {
-        exec {
-            commandLine 'npm', 'version', version
+task installDeps {
+    configurations.compile.allDependencies.forEach { d ->
+        println makePackageName(d.group, d.name, d.version);
+        if(d.hasProperty('location')) {
+            println d.location
         }
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gradle.properties	Wed Jun 27 04:35:04 2018 +0300
@@ -0,0 +1,4 @@
+majorVersion=1
+minorVersion=0
+patchVersion=0
+suffixVersion=snap
\ No newline at end of file