Skip to content

Instantly share code, notes, and snippets.

View zloopk09's full-sized avatar
🎧
My Heart is in the Work

zloopk09 zloopk09

🎧
My Heart is in the Work
View GitHub Profile
long beginOfSetting = System.currentTimeMillis()
gradle.projectsLoaded {
println '初始化阶段,耗时:' + (System.currentTimeMillis() - beginOfSetting) + 'ms'
}
def beginOfConfig
def configHasBegin = false
def beginOfProjectConfig = new HashMap()
gradle.beforeProject { project ->
org.gradle.jvmargs=-Xms2048m -Xmx3072m -XX:MaxMetaspaceSize=1024m -XX:MetaspaceSize=1024m \
-XX:ReservedCodeCacheSize=1024m -XX:SoftRefLRUPolicyMSPerMB=50 \
-XX:+UseCompressedOops -XX:+UseConcMarkSweepGC \
-XX:CMSInitiatingOccupancyFraction=75 -Dfile.encoding=UTF-8
# \
# -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow \
# -DsocksProxyHost=127.0.0.1 -DsocksProxyPort=1086 -DsocksNonProxyHosts=alibaba.com
@zloopk09
zloopk09 / aosp excludeFolder
Last active March 4, 2019 05:35
source build/envsetup.sh && make idegen && development/tools/idegen/idegen.sh 根目录生成 android.iml 和 android.ipr 后 修改android.iml文件 底部添加新excludeFolder规则
<excludeFolder url="file://$MODULE_DIR$/art" />
<excludeFolder url="file://$MODULE_DIR$/bionic" />
<excludeFolder url="file://$MODULE_DIR$/bootable" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/compatibility" />
<excludeFolder url="file://$MODULE_DIR$/cts" />
<excludeFolder url="file://$MODULE_DIR$/dalvik" />
<excludeFolder url="file://$MODULE_DIR$/developers" />
<excludeFolder url="file://$MODULE_DIR$/development" />
<excludeFolder url="file://$MODULE_DIR$/device" />
@zloopk09
zloopk09 / BaseDao.kt
Created December 7, 2018 07:09 — forked from florina-muntenescu/BaseDao.kt
Use Dao inheritance to reduce the amount of boilerplate code - https://medium.com/google-developers/7-pro-tips-for-room-fbadea4bfbd1
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@zloopk09
zloopk09 / code style refs
Created November 29, 2018 03:10
code style refs
AOSP code style
https://github.com/aosp-mirror/platform_development/blob/master/ide/intellij/codestyles/AndroidStyle.xml
google code style
https://github.com/google/styleguide
@zloopk09
zloopk09 / .git-commit-template.txt
Created September 25, 2018 06:28 — forked from jmaxhu/.git-commit-template.txt
一份建议的git commit模板
# <类型>: (类型的值见下面描述) <主题> (最多50个字)
# 解释为什么要做这些改动
# |<---- 请限制每行最多72个字 ---->|
# 提供相关文章和其它资源的链接和关键字
# 例如: Github issue #23
# --- 提交 结束 ---
# 类型值包含
# custom IntelliJ IDEA VM options
-server
-Xms3000M
-Xmx3000M
-Xmn600M
-Xss256K
-XX:SurvivorRatio=1
-XX:MetaspaceSize=500M
-XX:MaxMetaspaceSize=500M
-XX:ReservedCodeCacheSize=360m
@zloopk09
zloopk09 / .git-commit-template.txt
Created August 29, 2018 17:29 — forked from adeekshith/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@zloopk09
zloopk09 / README-Template.md
Created August 23, 2018 13:38 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites