Skip to content

Instantly share code, notes, and snippets.

Avatar

Karol Wrótniak koral--

View GitHub Profile
@koral--
koral-- / flatten.dart
Created Jun 28, 2022
List flattening
View flatten.dart
void main() {
var labels = [1,2,6,7];
print(labels.map((l)=> ["x", l.toString()]).expand((t)=>t).toList());
}
View pubspec.yaml
flutter_intl:
enabled: true
class_name: Strings
localizely:
project_id: 39cf3f3a-a154-4d3f-85b5-f57e71774f3e
@koral--
koral-- / build.gradle.kts
Created Mar 2, 2020
GenerateNavArgsProguardRulesTask usage
View build.gradle.kts
tasks {
named("preBuild").dependsOn(register("generateNavArgsProguardRules", GenerateNavArgsProguardRulesTask::class))
}
android {
defaultConfig {
consumerProguardFile(File(buildDir, NAVARGS_PROGUARD_RULES_PATH))
}
}
@koral--
koral-- / build.gradle.kts
Created Mar 2, 2020
GenerateNavArgsProguardRulesTask registration
View build.gradle.kts
tasks {
named("preBuild").dependsOn(register("generateNavArgsProguardRules", GenerateNavArgsProguardRulesTask::class))
}
@koral--
koral-- / GenerateNavArgsProguardRulesTask.kt
Created Mar 2, 2020
Complete GenerateNavArgsProguardRulesTask
View GenerateNavArgsProguardRulesTask.kt
import org.gradle.api.DefaultTask
import org.gradle.api.file.FileTree
import org.gradle.api.tasks.*
import java.io.File
import javax.xml.parsers.DocumentBuilderFactory
const val NAVARGS_PROGUARD_RULES_PATH = "generated/proguard-rules/navargs-proguard-rules.pro"
private const val APP_NAMESPACE = "http://schemas.android.com/apk/res-auto"
@CacheableTask
@koral--
koral-- / GenerateNavArgsProguardRulesTask.kt
Last active Mar 2, 2020
GenerateNavArgsProguardRulesTask action
View GenerateNavArgsProguardRulesTask.kt
private const val APP_NAMESPACE = "http://schemas.android.com/apk/res-auto"
abstract class GenerateNavArgsProguardRulesTask : DefaultTask() {
@get:InputFiles
@get:SkipWhenEmpty
val navigationGraphFiles: FileTree = project.fileTree("src/main/res/navigation") {
include("*.xml")
}
@koral--
koral-- / GenerateNavArgsProguardRulesTask.kt
Last active Mar 2, 2020
GenerateNavArgsProguardRulesTask inputs and outputs
View GenerateNavArgsProguardRulesTask.kt
const val NAVARGS_PROGUARD_RULES_PATH = "generated/proguard-rules/navargs-proguard-rules.pro"
abstract class GenerateNavArgsProguardRulesTask : DefaultTask() {
@get:InputFiles
@get:SkipWhenEmpty
val navigationGraphFiles: FileTree = project.fileTree("src/main/res/navigation") {
include("*.xml")
}
@koral--
koral-- / GenerateNavArgsProguardRulesTask.kt
Created Mar 1, 2020
GenerateNavArgsProguardRulesTask skeleton
View GenerateNavArgsProguardRulesTask.kt
abstract class GenerateNavArgsProguardRulesTask : DefaultTask() {
}
@koral--
koral-- / bitrise.yml
Last active Dec 3, 2021
Sample Bitrise workflows configuration
View bitrise.yml
---
format_version: '8'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: android
trigger_map:
- push_branch: master
workflow: deploy-staging
- pull_request_source_branch: "*"
workflow: verification
- tag: "*"
View build.gradle
buildscript {
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath "com.android.tools.build:gradle:+"
}
}