File tree 2 files changed +11
-5
lines changed
2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,12 @@ node {
16
16
task prepareNodePackage (type : Copy ) {
17
17
from(" npm" ) {
18
18
include ' package.json'
19
- expand (project. properties + [kotlinDependency : " " ])
19
+ /*
20
+ * Postpone expansion of package.json until we configure version property in build.gradle
21
+ */
22
+ afterEvaluate {
23
+ expand(project. properties + [kotlinDependency : " " ])
24
+ }
20
25
}
21
26
from(" npm" ) {
22
27
exclude ' package.json'
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ def distTag(version) {
16
16
17
17
def npmTemplateDir = file(" $projectDir /js/npm" )
18
18
def npmDeployDir = file(" $buildDir /npm" )
19
- def npmDeployTag = distTag(version)
20
19
21
20
def authToken = prop(" kotlin.npmjs.auth.token" , " " )
22
21
def dryRun = prop(" dryRun" , " false" )
@@ -32,10 +31,12 @@ task preparePublishNpm(type: Copy) {
32
31
33
32
task publishNpm (type : NpmTask , dependsOn : [preparePublishNpm]) {
34
33
workingDir = npmDeployDir
35
- def deployArgs = [' publish' ,
36
- " --//registry.npmjs.org/:_authToken=$authToken " ,
37
- " --tag=$npmDeployTag " ]
34
+
38
35
doFirst {
36
+ def npmDeployTag = distTag(version)
37
+ def deployArgs = [' publish' ,
38
+ " --//registry.npmjs.org/:_authToken=$authToken " ,
39
+ " --tag=$npmDeployTag " ]
39
40
if (dryRun == " true" ) {
40
41
println (" $npmDeployDir \$ npm arguments: $deployArgs " )
41
42
args = [' pack' ]
You can’t perform that action at this time.
0 commit comments