File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,12 @@ node {
1616task prepareNodePackage (type : Copy ) {
1717 from(" npm" ) {
1818 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+ }
2025 }
2126 from(" npm" ) {
2227 exclude ' package.json'
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ def distTag(version) {
1616
1717def npmTemplateDir = file(" $projectDir /js/npm" )
1818def npmDeployDir = file(" $buildDir /npm" )
19- def npmDeployTag = distTag(version)
2019
2120def authToken = prop(" kotlin.npmjs.auth.token" , " " )
2221def dryRun = prop(" dryRun" , " false" )
@@ -32,10 +31,12 @@ task preparePublishNpm(type: Copy) {
3231
3332task publishNpm (type : NpmTask , dependsOn : [preparePublishNpm]) {
3433 workingDir = npmDeployDir
35- def deployArgs = [' publish' ,
36- " --//registry.npmjs.org/:_authToken=$authToken " ,
37- " --tag=$npmDeployTag " ]
34+
3835 doFirst {
36+ def npmDeployTag = distTag(version)
37+ def deployArgs = [' publish' ,
38+ " --//registry.npmjs.org/:_authToken=$authToken " ,
39+ " --tag=$npmDeployTag " ]
3940 if (dryRun == " true" ) {
4041 println (" $npmDeployDir \$ npm arguments: $deployArgs " )
4142 args = [' pack' ]
You can’t perform that action at this time.
0 commit comments