import groovy.json.JsonSlurper; configurations.maybeCreate("default") def inputFile = new File(projectDir, '../../react-native/package.json') def json = new JsonSlurper().parseText(inputFile.text) def reactNativeVersion = json.version as String def (major, minor, patch) = reactNativeVersion.tokenize('.') def engine = "jsc" rootProject.getSubprojects().forEach({project -> if (project.plugins.hasPlugin("com.android.application")) { if(project.ext.react.enableHermes) { engine = "hermes" } } }) artifacts.add("default", file("react-native-vision-camera-${engine}.aar"))