Skip to content

Commit

Permalink
Update project file
Browse files Browse the repository at this point in the history
  • Loading branch information
penfeizhou committed Jul 13, 2022
1 parent bb36e12 commit 6190172
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import groovy.json.JsonSlurper

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)

Expand Down
2 changes: 1 addition & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import groovy.json.JsonSlurper

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'

Expand Down
2 changes: 1 addition & 1 deletion example/iOS/Podfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require "json"

package = JSON.parse(File.read(File.join(__dir__, "../../package.json")))
version = package['dependencies']["doric"]
version = package['peerDependencies']["doric"]
version = version.gsub('^','').gsub('>=','')

source 'https://cdn.cocoapods.org/'
Expand Down

0 comments on commit 6190172

Please sign in to comment.