This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.tools.ant.taskdefs.condition.Os | |
def config = project.hasProperty("react") ? project.react : []; | |
def cliPath = config.cliPath ?: "node_modules/react-native/local-cli/cli.js" | |
def bundleAssetName = config.bundleAssetName ?: "index.android.bundle" | |
def entryFile = config.entryFile ?: "index.android.js" | |
// because elvis operator | |
def elvisFile(thing) { | |
return thing ? file(thing) : null; | |
} | |
def reactRoot = elvisFile(config.root) ?: file("../../") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Java | |
public static DetailsFragment newInstance(int id) { | |
Bundle arguments = new Bundle(); | |
arguments.putInt("id", id); | |
DetailsFragment fragment = new DetailsFragment(); | |
fragment.setArguments(arguments); | |
return fragment; | |
} |