This file contains 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
/** | |
* Signs release build with the specified signature parameters. When parameters are omitted the | |
* release APK file will be left unsigned. | |
* | |
* By default, keystore.properties file in the project's or root project's folder will be used as a | |
* source of required signing data: | |
* | |
* storeFile=/Users/me/keyvault/release.keystore | |
* storePassword=pass123 | |
* keyAlias=sampleAlias |
This file contains 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
/* | |
* Initializes versionName and versionCode from version.properties file. | |
* | |
* Just create version.properties file in the project's or root project's folder with the next | |
* properties: | |
* | |
* major=1 | |
* minor=2 | |
* patch=3 | |
* |
This file contains 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
final String TWINE_INPUT_FILE = "${projectDir}/translations/twine.txt" | |
final String TWINE_OUTPUT_DIR = "${projectDir}/build/generated/twine" | |
android.applicationVariants.all { variant -> | |
variant.registerGeneratedResFolders(files(TWINE_OUTPUT_DIR)) | |
} | |
task generateLocalizations { | |
description "Generates localizations from twine.txt file." | |
inputs.file(TWINE_INPUT_FILE) |
This file contains 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
cmake_minimum_required(VERSION 3.6) | |
# opencv | |
set(OpenCV_DIR ${CMAKE_CURRENT_SOURCE_DIR}/opencv-4.5.0/sdk/native/jni) | |
find_package(OpenCV REQUIRED core imgproc) # specify desired OpenCV modules here | |
# mylibname | |
add_library(mylibname SHARED nativeutils.cpp) | |
target_include_directories(mylibname PRIVATE | |
${OpenCV_INCLUDE_DIRS}) |
This file contains 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
pluginManagement { | |
repositories { | |
gradlePluginPortal() | |
google() | |
mavenCentral() | |
} | |
resolutionStrategy { | |
eachPlugin { | |
when { | |
requested.id.namespace == "com.android" -> { |
This file contains 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
sealed class Screen : Parcelable { | |
@Parcelize | |
object First : Screen() | |
@Parcelize | |
data class Second(val id: Int) : Screen() | |
@Parcelize | |
data class Third(val text: String) : Screen() |
This file contains 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
@Composable | |
fun NavHostScreen() { | |
val navController = rememberNavController<Screen>( | |
startDestination = Screen.First, | |
) | |
NavBackHandler(navController) | |
NavHost(controller = navController) { screen -> | |
when (screen) { |