jcenter 上传
This commit is contained in:
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@ -37,7 +37,7 @@
|
|||||||
<ConfirmationsSetting value="0" id="Add" />
|
<ConfirmationsSetting value="0" id="Add" />
|
||||||
<ConfirmationsSetting value="0" id="Remove" />
|
<ConfirmationsSetting value="0" id="Remove" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
@ -7,8 +7,8 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 9
|
minSdkVersion 9
|
||||||
targetSdkVersion 23
|
targetSdkVersion 23
|
||||||
versionCode 80
|
versionCode 81
|
||||||
versionName "2.3.2"
|
versionName "2.3.3"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
@ -23,4 +23,4 @@ dependencies {
|
|||||||
testCompile 'junit:junit:4.12'
|
testCompile 'junit:junit:4.12'
|
||||||
compile 'com.android.support:appcompat-v7:23.1.1'
|
compile 'com.android.support:appcompat-v7:23.1.1'
|
||||||
}
|
}
|
||||||
//apply from: 'jcenter.gradle'
|
apply from: 'jcenter.gradle'
|
||||||
|
@ -3,7 +3,7 @@ version = PROJ_VERSION
|
|||||||
project.archivesBaseName = PROJ_ARTIFACT_ID
|
project.archivesBaseName = PROJ_ARTIFACT_ID
|
||||||
apply plugin: 'com.jfrog.bintray'
|
apply plugin: 'com.jfrog.bintray'
|
||||||
apply plugin: 'com.github.dcendents.android-maven'
|
apply plugin: 'com.github.dcendents.android-maven'
|
||||||
//输入:gradlew bintrayupload 执行
|
//输入:gradlew bintray 执行
|
||||||
|
|
||||||
//############################## jar、sources、doc 打包 start #######################################
|
//############################## jar、sources、doc 打包 start #######################################
|
||||||
task sourcesJar(type: Jar) {
|
task sourcesJar(type: Jar) {
|
||||||
@ -75,9 +75,10 @@ artifacts {
|
|||||||
|
|
||||||
//################################# jcenter 上传配置 start #########################################
|
//################################# jcenter 上传配置 start #########################################
|
||||||
bintray {
|
bintray {
|
||||||
user = hasProperty("bintrayUser") ? getProperty("bintrayUser") : getProperty("BINTRAY_USER")
|
// user = hasProperty("bintrayUser") ? getProperty("bintrayUser") : getProperty("BINTRAY_USER")
|
||||||
key = hasProperty("bintrayKey") ? getProperty("bintrayKey") : getProperty("BINTRAY_KEY")
|
// key = hasProperty("bintrayKey") ? getProperty("bintrayKey") : getProperty("BINTRAY_KEY")
|
||||||
|
user = BINTRAY_USER
|
||||||
|
key = BINTRAY_KEY
|
||||||
configurations = ['archives']
|
configurations = ['archives']
|
||||||
|
|
||||||
pkg {
|
pkg {
|
||||||
|
@ -37,14 +37,11 @@ import java.util.concurrent.locks.ReentrantLock;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Memory safer implementation of android.os.Handler
|
* Memory safer implementation of android.os.Handler
|
||||||
* <p/>
|
|
||||||
* Original implementation of Handlers always keeps hard reference to handler in queue of execution.
|
* Original implementation of Handlers always keeps hard reference to handler in queue of execution.
|
||||||
* If you create anonymous handler and post delayed message into it, it will keep all parent class
|
* If you create anonymous handler and post delayed message into it, it will keep all parent class
|
||||||
* for that time in memory even if it could be cleaned.
|
* for that time in memory even if it could be cleaned.
|
||||||
* <p/>
|
|
||||||
* This implementation is trickier, it will keep WeakReferences to runnables and messages,
|
* This implementation is trickier, it will keep WeakReferences to runnables and messages,
|
||||||
* and GC could collect them once WeakHandler instance is not referenced any more
|
* and GC could collect them once WeakHandler instance is not referenced any more
|
||||||
* <p/>
|
|
||||||
*
|
*
|
||||||
* @see android.os.Handler
|
* @see android.os.Handler
|
||||||
*
|
*
|
||||||
|
@ -54,10 +54,10 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> {
|
|||||||
public static final int DOWNLOAD_RESUME = 0x05;
|
public static final int DOWNLOAD_RESUME = 0x05;
|
||||||
public static final int DOWNLOAD_COMPLETE = 0x06;
|
public static final int DOWNLOAD_COMPLETE = 0x06;
|
||||||
public static final int DOWNLOAD_RUNNING = 0x07;
|
public static final int DOWNLOAD_RUNNING = 0x07;
|
||||||
//private static final String DOWNLOAD_URL =
|
|
||||||
// "http://static.gaoshouyou.com/d/3a/93/573ae1db9493a801c24bf66128b11e39.apk";
|
|
||||||
private static final String DOWNLOAD_URL =
|
private static final String DOWNLOAD_URL =
|
||||||
"http://o.aolcdn.com/hss/storage/midas/3679ed444c51eca8d17a82b7da021b01/204737495/fitbit-charge-2.jpeg";
|
"http://static.gaoshouyou.com/d/3a/93/573ae1db9493a801c24bf66128b11e39.apk";
|
||||||
|
//private static final String DOWNLOAD_URL =
|
||||||
|
// "http://www.yangqiang.im/wp-content/uploads/2016/10/%E6%8A%BD%E8%B1%A1%E5%B7%A5%E5%8E%82%E6%A8%A1%E5%BC%8F.png";
|
||||||
@Bind(R.id.progressBar) HorizontalProgressBarWithNumber mPb;
|
@Bind(R.id.progressBar) HorizontalProgressBarWithNumber mPb;
|
||||||
@Bind(R.id.start) Button mStart;
|
@Bind(R.id.start) Button mStart;
|
||||||
@Bind(R.id.stop) Button mStop;
|
@Bind(R.id.stop) Button mStop;
|
||||||
@ -124,9 +124,9 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> {
|
|||||||
mCancel.setEnabled(false);
|
mCancel.setEnabled(false);
|
||||||
setBtState(true);
|
setBtState(true);
|
||||||
|
|
||||||
String path = Environment.getExternalStorageDirectory().getPath() + "/test.jpg";
|
//String path = Environment.getExternalStorageDirectory().getPath() + "/test.jpg";
|
||||||
Bitmap bm = BitmapFactory.decodeFile(path);
|
//Bitmap bm = BitmapFactory.decodeFile(path);
|
||||||
mImg.setImageBitmap(bm);
|
//mImg.setImageBitmap(bm);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -203,10 +203,10 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> {
|
|||||||
private void start() {
|
private void start() {
|
||||||
Aria.whit(this)
|
Aria.whit(this)
|
||||||
.load(DOWNLOAD_URL)
|
.load(DOWNLOAD_URL)
|
||||||
//.setDownloadPath(Environment.getExternalStorageDirectory().getPath() + "/test.apk")
|
.setDownloadPath(Environment.getExternalStorageDirectory().getPath() + "/test.apk")
|
||||||
//.setDownloadName("test.apk")
|
.setDownloadName("test.apk")
|
||||||
.setDownloadPath(Environment.getExternalStorageDirectory().getPath() + "/test.jpg")
|
//.setDownloadPath(Environment.getExternalStorageDirectory().getPath() + "/test.jpg")
|
||||||
.setDownloadName("test.jpg")
|
//.setDownloadName("test.jpg")
|
||||||
.start();
|
.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user