This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd `dirname $0`/../ | |
projectDir=`pwd` | |
buildDir="$projectDir/build" | |
# release Official apk | |
cd $buildDir | |
touch timestampFile | |
echo "Build release official apk" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2018. Xi'an iRain IOT Technology service CO., Ltd (ShenZhen). All Rights Reserved. | |
*/ | |
package com.parkingwang.iop.api.json | |
import com.google.gson.Gson | |
import com.google.gson.GsonBuilder | |
import com.google.gson.reflect.TypeToken | |
import com.parkingwang.iop.api.services.park.objects.Version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task javadoc(type: Javadoc, dependsOn: 'assembleRelease') { | |
source = android.sourceSets.main.java.srcDirs | |
classpath += configurations.compile | |
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) | |
android.libraryVariants.all { variant -> | |
if (variant.name == 'release') { | |
owner.classpath += variant.javaCompile.classpath | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun Date.toCalendar(): Calendar = Calendar.getInstance().apply { this.time = this@toCalendar } | |
fun Calendar.addDayOfMonth(amount: Int): Calendar { | |
this.add(Calendar.DAY_OF_MONTH, amount) | |
return this | |
} | |
fun Calendar.formatTo(formatter: SimpleDateFormat): String { | |
return formatter.format(this.timeInMillis) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task syncJavadoc(type: Sync) { | |
from javadoc.destinationDir | |
into rootProject.file('docs') | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Subscription subscription = Observable.interval(0, 1, TimeUnit.SECONDS) | |
.take(seconds + 1) | |
.map(new Func1<Long, Long>() { | |
@Override | |
public Long call(Long past) { | |
return seconds - past - 1; | |
} | |
}) | |
.filter(new Func1<Long, Boolean>() { | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install -y libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 绑定Checkable控件的Layout. | |
*/ | |
public static class ForceableChoiceLayout extends DefaultChoiceView { | |
/** | |
* 是否强制设为选中状态 | |
*/ | |
private boolean mForceChecked; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.parkingwang.widget; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.util.AttributeSet; | |
import android.widget.LinearLayout; | |
import com.parkingwang.app.R; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2015. Xi'an iRain IOT Technology Service CO., Ltd. All Rights Reserved. | |
*/ | |
package com.parkingwang.widget; | |
import android.content.Context; | |
import android.content.res.ColorStateList; | |
import android.content.res.TypedArray; | |
import android.graphics.Canvas; |
NewerOlder