Skip to content

Instantly share code, notes, and snippets.

View ruijun's full-sized avatar

Jimson Liang ruijun

View GitHub Profile
@ruijun
ruijun / copy-mapping
Created January 12, 2016 05:29
copy proguard mapping.txt to save it
android {
applicationVariants.all { variant ->
variant.outputs.each { output ->
if (variant.getBuildType().isMinifyEnabled()) {
variant.assemble.doLast{
copy {
from variant.mappingFile
into "${projectDir}/mappings"
rename { String fileName ->
"mapping-${variant.name}.txt"
@qrtt1
qrtt1 / aar-deps.gradle
Last active May 19, 2020 16:09
gradle: package *.jar into aar
project.afterEvaluate {
def isAndroidLibraryProject = project.plugins.hasPlugin('com.android.library')
if(isAndroidLibraryProject) {
task copyDeps(type:Copy) {
from configurations.compile {
include '**/*.jar'
}
into "./build/intermediates/bundles/release/libs/"
}
bundleRelease.dependsOn copyDeps
获取问题跟文章
http://v3.wufazhuce.com:8000/api/reading/index/
然后根据essay跟question id进去到不同的详细
http://v3.wufazhuce.com:8000/api/question/1282
http://v3.wufazhuce.com:8000/api/essay/1339
获取首页
http://v3.wufazhuce.com:8000/api/hp/idlist/0
然后通过http://v3.wufazhuce.com:8000/api/hp/detail/1275 进入
@IlyaEremin
IlyaEremin / build.gradle
Created February 18, 2017 20:34
Example of managing dependencies in separate file
apply from: 'deps.gradle'
// ...
dependencies {
compile supportLibs
compile rxJavaLibs
compile retrofitLibs
compile okHttpLibs
@wyon
wyon / BlockDetect.java
Last active February 25, 2021 05:56
检测应用在UI线程的卡顿,打印出卡顿时调用堆栈。
public class BlockDetect {
// BlockDetectByPrinter
public static void start() {
Looper.getMainLooper().setMessageLogging(new Printer() {
private static final String START = ">>>>> Dispatching";
private static final String END = "<<<<< Finished";
@Override
@PierceZ
PierceZ / EventLiveData.java
Created September 20, 2017 13:00
Another approach where EventLiveData contains a reference to its lifecycle.
public class EventLiveData extends LiveData<Object> {
private final int mSubject;
private final LifecycleRegistryOwner mLifecycle;
public EventLiveData(@LiveDataBus.Subject int subject, @NonNull LifecycleRegistryOwner lifecycle) {
mSubject = subject;
mLifecycle = lifecycle;
}