Skip to content

Instantly share code, notes, and snippets.

View johnsonlee's full-sized avatar
🎯
Focusing

Johnson Lee johnsonlee

🎯
Focusing
View GitHub Profile
Arrays.asList(args).forEach(System.out::println);
Function<Int, Int> i2i = /* ... */;
@FunctionalInterface
interface Int2Int {
int invoke(int value);
}
@johnsonlee
johnsonlee / fun.kt
Last active December 9, 2022 10:19
(Int) -> Int
@johnsonlee
johnsonlee / build.gradle
Created July 9, 2022 06:13
Generating Build Info as Source Code for Gradle Project
apply plugin: 'io.johnsonlee.buildprops'
@johnsonlee
johnsonlee / build.gradle
Created July 9, 2022 06:11
Generating Build Info as Source Code for Gradle Project
plugins {
id("io.johnsonlee.buildprops") version "1.2.0"
}
@johnsonlee
johnsonlee / Build.kt
Created July 9, 2022 05:32
Generating Build Info for Gradle Project
internal const val GROUP = "$GROUP"
internal const val VERSION = "$VERSION"
@johnsonlee
johnsonlee / build.gradle.kts
Last active July 9, 2022 05:30
Generating Build Info for Gradle Project
sourceSets {
getByName("main").java.srcDirs("src/main/kotlinTemplates")
}
val copyKotlinTemplates = tasks.register<Copy>("copyKotlinTemplates") {
from("src/main/kotlinTemplates")
into("$buildDir/generated/sources/kotlinTemplates")
expand(
"GROUP" to project.group,
"VERSION" to project.version
@johnsonlee
johnsonlee / build.gradle
Created July 9, 2022 04:58
Generating Build Info for Gradle Project
project.dependencies {
implementation("${Build.GROUP}:booster-android-instrument-thread:${Build.VERSION}")
}
@johnsonlee
johnsonlee / build.gradle
Created July 9, 2022 04:57
Generating Build Info for Gradle Project
project.dependencies {
implementation("${project.group}:booster-android-instrument-thread:${project.version}")
}