Update template file

This commit is contained in:
pengfei.zhou 2022-07-13 16:36:54 +08:00 committed by osborn
parent dc3c06c81e
commit e900b35281
3 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
import groovy.json.JsonSlurper import groovy.json.JsonSlurper
def model = new JsonSlurper().parse(new File(project.getProjectDir().parent + File.separator + "package.json")) def model = new JsonSlurper().parse(new File(project.getProjectDir().parent + File.separator + "package.json"))
def doricSDKVersion = model.dependencies.doric.replace("^", "").replace(">=","") def doricSDKVersion = model.peerDependencies.doric.replace("^", "").replace(">=","")
println("Doric Version:" + doricSDKVersion) println("Doric Version:" + doricSDKVersion)

View File

@ -1,7 +1,7 @@
import groovy.json.JsonSlurper import groovy.json.JsonSlurper
def model = new JsonSlurper().parse(new File(project.rootDir.parentFile.parent + File.separator + "package.json")) def model = new JsonSlurper().parse(new File(project.rootDir.parentFile.parent + File.separator + "package.json"))
def doricSDKVersion = model.dependencies.doric.replace("^", "").replace(">=","") def doricSDKVersion = model.peerDependencies.doric.replace("^", "").replace(">=","")
apply plugin: 'com.android.application' apply plugin: 'com.android.application'

View File

@ -1,7 +1,7 @@
require "json" require "json"
package = JSON.parse(File.read(File.join(__dir__, "../../package.json"))) package = JSON.parse(File.read(File.join(__dir__, "../../package.json")))
version = package['dependencies']["doric"] version = package['peerDependencies']["doric"]
version = version.gsub('^','').gsub('>=','') version = version.gsub('^','').gsub('>=','')
source 'https://cdn.cocoapods.org/' source 'https://cdn.cocoapods.org/'