Skip to content

Instantly share code, notes, and snippets.

View belinwu's full-sized avatar

吴上阿吉 belinwu

View GitHub Profile
@belinwu
belinwu / LazyLifecycleManager.kt
Created June 23, 2022 11:03 — forked from vishalratna-microsoft/LazyLifecycleManager.kt
Code for LazyLifecycleManager
import android.app.Activity
import android.util.Log
import android.view.ViewTreeObserver
import androidx.annotation.MainThread
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import com.******************.Barrier
import com.******************.Closure
import com.*******************.Once
./gradlew clean buildRelease publish
@belinwu
belinwu / build.gradle
Created March 23, 2020 14:08 — forked from wilik16/build.gradle
Archive/Copy debug or release APK / AAB (Android App Bundle) file and/or mapping.txt to a versioned folder
android {
applicationVariants.all { variant ->
variant.outputs.all {
def fileName = "app"
switch (variant.buildType.name) {
case "debug":
fileName = "${appNameDebug}-${variant.versionCode}"
break
case "release":
fileName = "${appNameRelease}-${variant.versionCode}"
@belinwu
belinwu / build.gradle
Created July 23, 2019 03:44 — forked from akperkins/build.gradle
Example of auto-generating the versionCode
apply plugin: 'com.android.application'
// version information
def versionMajor = 1
def versionMinor = 0
def versionPatch = 0
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"