0.0.34 • Published 4 years ago

@zkty-team/x-engine-module-template v0.0.34

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

gradle read version from config file https://stackoverflow.com/questions/47492210/react-native-automatic-version-name-from-package-json-to-android-build-manifes

// On top of your file import a JSON parser
import groovy.json.JsonSlurper

// Create an easy to use function
def getVersionFromNpm() {
    //  Read and parse package.json file from project root
    def inputFile = new File("$rootDir/../package.json")
    def packageJson = new JsonSlurper().parseText(inputFile.text)

    // Return the version, you can get any value this way
    return packageJson["version"]
}

android {
    defaultConfig {
        applicationId "your.app.id"
        versionName getVersionFromNpm()
    }
}

pod config file https://stackoverflow.com/questions/21405457/autoincrement-versioncode-with-gradle-extra-properties