Skip to content

Instantly share code, notes, and snippets.

View kartikarora's full-sized avatar
🎯
Focusing

Kartik Arora kartikarora

🎯
Focusing
View GitHub Profile
dependencies {
implementation(libs.my.spectacular)
}
[versions]
mySpectacularLibraryVersion = "1.2.3"
[libraries]
my-spectacular = { group = "my.spectacular", name = "library", version.ref = "mySpectacularLibraryVersion" }
dependencyResolutionManagement {
versionCatalogs {
create("libs") {
version()
library()
bundle()
plugin()
}
}
}
@kartikarora
kartikarora / libs.versions.toml
Created February 25, 2024 11:20
version catalog
[versions]
[libraries]
[bundles]
[plugins]
dependencies {
implementation("my.spectacular:library:1.2.3")
}
dependencies {
implementation(Libraries.mySpectacular)
}
object Versions {
const val mySpectacularLibararyVersion = "1.2.3"
}
object Libraries {
const val val mySpectacular =
"my.spectacular:library:${Versions.mySpectacularLibararyVersion}"
}
@kartikarora
kartikarora / buckets
Last active April 19, 2023 05:43
Buckets for grammatical inflection
res/
values/
strings.xml
values-en-neuter/
strings.xml
values-en-masculine/
strings.xml
values-en-feminine/
strings.xml
values-fr-neuter/
// Get GrammaticalInflectionManager system service
val grammaticalInflectionManager = context.getSystemService(GrammaticalInflectionManager::class.java)
/**
* Use service to get inflection of the app
* Will be one of
* Configuration.GRAMMATICAL_GENDER_NEUTRAL
* Configuration.GRAMMATICAL_GENDER_FEMININE
* Configuration.GRAMMATICAL_GENDER_MASCULINE
*/
// Get GrammaticalInflectionManager system service
val grammaticalInflectionManager = context.getSystemService(GrammaticalInflectionManager::class.java)
/**
* Use service to change the inflection of the app
* Options are
* Configuration.GRAMMATICAL_GENDER_NEUTRAL
* Configuration.GRAMMATICAL_GENDER_FEMININE
* Configuration.GRAMMATICAL_GENDER_MASCULINE
*/