Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexLiuSheng committed Dec 11, 2019
1 parent c32b76d commit a36edeb
Show file tree
Hide file tree
Showing 16 changed files with 111 additions and 31 deletions.
7 changes: 3 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
// classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
// classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
// classpath 'me.tatarka:gradle-retrolambda:3.2.5'
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
82 changes: 80 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
version = "2.2.2"
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
Expand All @@ -24,8 +27,83 @@ android {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.squareup.okhttp3:okhttp:3.14.2'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.squareup.okhttp3:okhttp:3.8.1'
implementation 'org.greenrobot:eventbus:3.1.1'

}
def siteUrl = 'https://github.com/AlexLiuSheng/CheckVersionLib' // 项目的主页
def gitUrl = 'https://github.com/AlexLiuSheng/CheckVersionLib.git' // Git仓库的url
group = "com.allenliu.versionchecklib" // Maven Group ID for the artifact,一般填你唯一的包名
install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
// Add your description here
name 'a library that can auto check version on android ' //项目描述
url siteUrl
// Set your license
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'liusheng' //填写的一些基本信息
name 'AllenLiu'
email '29949821@qq.com'
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}


task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
task javadoc(type: Javadoc) {
options.encoding = "UTF-8"
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apiKey")
configurations = ['archives']
pkg {
repo = "maven"
name = "VersionCheckLib" //发布到JCenter上的项目名字
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = ["Apache-2.0"]
publish = true
}
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
options.addStringOption('charSet', 'UTF-8')
}

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Build;
import androidx.core.app.NotificationCompat;
import android.support.v4.app.NotificationCompat;


import com.allenliu.versionchecklib.R;
import com.allenliu.versionchecklib.callback.DownloadListener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Bundle;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.appcompat.app.AppCompatActivity;

import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.widget.Toast;

import com.allenliu.versionchecklib.R;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Bundle;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.appcompat.app.AlertDialog;

import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.allenliu.versionchecklib.core;

import androidx.core.content.FileProvider;

import android.support.v4.content.FileProvider;

/**
* Created by Allen Liu on 2017/2/28.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.allenliu.versionchecklib.v2;

import android.content.Context;
import android.support.annotation.Nullable;

import androidx.annotation.Nullable;

import com.allenliu.versionchecklib.core.http.AllenHttp;
import com.allenliu.versionchecklib.utils.AllenEventBusUtil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import androidx.annotation.NonNull;
import android.support.annotation.NonNull;


import com.allenliu.versionchecklib.callback.APKDownloadListener;
import com.allenliu.versionchecklib.callback.CommitClickListener;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.allenliu.versionchecklib.v2.callback;

import androidx.annotation.Nullable;
import android.support.annotation.Nullable;

import com.allenliu.versionchecklib.v2.builder.DownloadBuilder;
import com.allenliu.versionchecklib.v2.builder.UIData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
import android.os.Build;
import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import android.app.Dialog;
import android.content.DialogInterface;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import android.view.View;

import com.allenliu.versionchecklib.R;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import android.app.Dialog;
import android.content.DialogInterface;

import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ProgressBar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Build;
import android.support.annotation.RequiresApi;
import android.support.v4.app.NotificationCompat;

import androidx.annotation.RequiresApi;
import androidx.core.app.NotificationCompat;

import com.allenliu.versionchecklib.R;
import com.allenliu.versionchecklib.core.PermissionDialogActivity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import androidx.appcompat.app.AlertDialog;

import android.support.v7.app.AlertDialog;
import android.view.View;

import com.allenliu.versionchecklib.R;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
import android.content.ServiceConnection;
import android.os.Build;
import android.os.IBinder;
import android.support.annotation.Nullable;
import android.support.annotation.WorkerThread;

import androidx.annotation.Nullable;
import androidx.annotation.WorkerThread;
import androidx.core.app.NotificationCompat;

import com.allenliu.versionchecklib.R;
import com.allenliu.versionchecklib.callback.DownloadListener;
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include ':library', "sample"
include ':library',':sample'

0 comments on commit a36edeb

Please sign in to comment.