Commit aa7373648aef20f51b852c7ab72d3f017aec9d41
1 parent
31f3f946
jcenter bintray libs syns
Showing
13 changed files
with
148 additions
and
29 deletions
.idea/gradle.xml
| @@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
| 9 | <set> | 9 | <set> |
| 10 | <option value="$PROJECT_DIR$" /> | 10 | <option value="$PROJECT_DIR$" /> |
| 11 | <option value="$PROJECT_DIR$/app" /> | 11 | <option value="$PROJECT_DIR$/app" /> |
| 12 | - <option value="$PROJECT_DIR$/cnlive_libs_base" /> | 12 | + <option value="$PROJECT_DIR$/cnlive" /> |
| 13 | </set> | 13 | </set> |
| 14 | </option> | 14 | </option> |
| 15 | <option name="resolveModulePerSourceSet" value="false" /> | 15 | <option name="resolveModulePerSourceSet" value="false" /> |
.idea/modules.xml
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | <modules> | 4 | <modules> |
| 5 | <module fileurl="file://$PROJECT_DIR$/CNLiveLibs.iml" filepath="$PROJECT_DIR$/CNLiveLibs.iml" /> | 5 | <module fileurl="file://$PROJECT_DIR$/CNLiveLibs.iml" filepath="$PROJECT_DIR$/CNLiveLibs.iml" /> |
| 6 | <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> | 6 | <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> |
| 7 | - <module fileurl="file://$PROJECT_DIR$/cnlive_libs_base/cnlive_libs_base.iml" filepath="$PROJECT_DIR$/cnlive_libs_base/cnlive_libs_base.iml" /> | 7 | + <module fileurl="file://$PROJECT_DIR$/cnlive/cnlive.iml" filepath="$PROJECT_DIR$/cnlive/cnlive.iml" /> |
| 8 | </modules> | 8 | </modules> |
| 9 | </component> | 9 | </component> |
| 10 | </project> | 10 | </project> |
| 11 | \ No newline at end of file | 11 | \ No newline at end of file |
base.properties
| 1 | +bintray.gpg.password=Passw0rd | ||
| 2 | +bintray.user=granzon | ||
| 3 | +bintray.apikey=ea2c6b59950379867b6dfb24a5649941c13460eb | ||
| 4 | + | ||
| 1 | # °üÐÅÏ¢ | 5 | # °üÐÅÏ¢ |
| 2 | -PROJ_GROUP=com.cnlive.libs | 6 | +PROJ_GROUP=com.cnlive.libs.base |
| 3 | 7 | ||
| 4 | # ÏîÄ¿µÄÃèÊö | 8 | # ÏîÄ¿µÄÃèÊö |
| 5 | PROJ_WEBSITEURL=http://www.cnlive.com | 9 | PROJ_WEBSITEURL=http://www.cnlive.com |
| 6 | PROJ_ISSUETRACKERURL=http://bj.gitlab.cnlive.com/cnlive-team/CNVideoDemo | 10 | PROJ_ISSUETRACKERURL=http://bj.gitlab.cnlive.com/cnlive-team/CNVideoDemo |
| 7 | -PROJ_VCSURL=http://bj.gitlab.cnlive.com/cnlive-team/CNVideoDemo | 11 | +PROJ_VCSURL=http://bj.gitlab.cnlive.com/cnlive-team/CNVideoDemo.git |
| 8 | PROJ_DESCRIPTION=CNLive Video Demo | 12 | PROJ_DESCRIPTION=CNLive Video Demo |
| 9 | 13 | ||
| 10 | # LicenceÐÅÏ¢ | 14 | # LicenceÐÅÏ¢ |
build.gradle
| @@ -6,18 +6,15 @@ buildscript { | @@ -6,18 +6,15 @@ buildscript { | ||
| 6 | } | 6 | } |
| 7 | dependencies { | 7 | dependencies { |
| 8 | classpath 'com.android.tools.build:gradle:2.3.3' | 8 | classpath 'com.android.tools.build:gradle:2.3.3' |
| 9 | - | ||
| 10 | - // NOTE: Do not place your application dependencies here; they belong | ||
| 11 | - // in the individual module build.gradle files | 9 | + //TODO 网络库 |
| 10 | + classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4' | ||
| 11 | + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' | ||
| 12 | } | 12 | } |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | allprojects { | 15 | allprojects { |
| 16 | repositories { | 16 | repositories { |
| 17 | jcenter() | 17 | jcenter() |
| 18 | - | ||
| 19 | -// TODO 本地库使用说明 预先声明本地代码仓库 | ||
| 20 | -// maven { url 'file:///E:/android-libs-ass/cnlive-base' } | ||
| 21 | } | 18 | } |
| 22 | } | 19 | } |
| 23 | 20 |
cnlive_libs_base/.gitignore renamed to cnlive/.gitignore
cnlive_libs_base/build.gradle renamed to cnlive/build.gradle
| @@ -24,30 +24,33 @@ android { | @@ -24,30 +24,33 @@ android { | ||
| 24 | 24 | ||
| 25 | dependencies { | 25 | dependencies { |
| 26 | compile fileTree(dir: 'libs', include: ['*.jar']) | 26 | compile fileTree(dir: 'libs', include: ['*.jar']) |
| 27 | - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { | ||
| 28 | - exclude group: 'com.android.support', module: 'support-annotations' | ||
| 29 | - }) | ||
| 30 | compile 'com.android.support:appcompat-v7:26.+' | 27 | compile 'com.android.support:appcompat-v7:26.+' |
| 31 | testCompile 'junit:junit:4.12' | 28 | testCompile 'junit:junit:4.12' |
| 32 | } | 29 | } |
| 33 | 30 | ||
| 34 | ext { | 31 | ext { |
| 35 | - PROJ_NAME = 'cnlive-base' | ||
| 36 | - PROJ_ARTIFACTID = 'base' | ||
| 37 | - PROJ_POM_NAME = 'libs-base' | ||
| 38 | - PROJ_VERSION = '1.0.0' | 32 | + bintrayRepo = 'cnlive' //Maven 库名称 |
| 33 | + bintrayName = 'base' //Maven 库内Lib包名 | ||
| 39 | 34 | ||
| 40 | - LOCAL_REPO_URL = 'file:///E:/android-libs-ass/cnlive-base' | ||
| 41 | -} | 35 | + publishedGroupId = 'com.cnlive' |
| 36 | + libraryName = 'base' | ||
| 37 | + artifact = 'cnlive' //与包名保持一致! | ||
| 42 | 38 | ||
| 43 | -uploadArchives { | ||
| 44 | - Properties props = new Properties(); | ||
| 45 | - props.load(new FileInputStream(rootProject.file('base.properties'))) | 39 | + libraryDescription = 'Libs' |
| 46 | 40 | ||
| 47 | - repositories.mavenDeployer { | ||
| 48 | - repository(url: LOCAL_REPO_URL) | ||
| 49 | - pom.groupId = props['PROJ_GROUP'] | ||
| 50 | - pom.artifactId = PROJ_ARTIFACTID | ||
| 51 | - pom.version = PROJ_VERSION | ||
| 52 | - } | 41 | + siteUrl = 'http://bj.gitlab.cnlive.com/cnlive-team/CNVideoDemo' |
| 42 | + gitUrl = 'http://bj.gitlab.cnlive.com/cnlive-team/CNVideoDemo.git' | ||
| 43 | + | ||
| 44 | + libraryVersion = '0.0.1' | ||
| 45 | + | ||
| 46 | + developerId = 'CNlive' | ||
| 47 | + developerName = 'Granzon' | ||
| 48 | + developerEmail = 'zhuxiansong@cnlive.com' | ||
| 49 | + | ||
| 50 | + licenseName = 'The Apache Software License, Version 2.0' | ||
| 51 | + licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
| 52 | + allLicenses = ["Apache-2.0"] | ||
| 53 | } | 53 | } |
| 54 | + | ||
| 55 | +apply from: './from_installv1.gradle' | ||
| 56 | +apply from: './from_bintrayv1.gradle' | ||
| 54 | \ No newline at end of file | 57 | \ No newline at end of file |
cnlive/from_bintrayv1.gradle
0 → 100644
| 1 | +apply plugin: 'com.jfrog.bintray' | ||
| 2 | + | ||
| 3 | +version = libraryVersion | ||
| 4 | + | ||
| 5 | +if (project.hasProperty("android")) { // Android libraries | ||
| 6 | + task sourcesJar(type: Jar) { | ||
| 7 | + classifier = 'sources' | ||
| 8 | + from android.sourceSets.main.java.srcDirs | ||
| 9 | + } | ||
| 10 | + | ||
| 11 | + task javadoc(type: Javadoc) { | ||
| 12 | + source = android.sourceSets.main.java.srcDirs | ||
| 13 | + classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) | ||
| 14 | + } | ||
| 15 | +} else { // Java libraries | ||
| 16 | + task sourcesJar(type: Jar, dependsOn: classes) { | ||
| 17 | + classifier = 'sources' | ||
| 18 | + from sourceSets.main.allSource | ||
| 19 | + } | ||
| 20 | +} | ||
| 21 | + | ||
| 22 | +task javadocJar(type: Jar, dependsOn: javadoc) { | ||
| 23 | + classifier = 'javadoc' | ||
| 24 | + from javadoc.destinationDir | ||
| 25 | +} | ||
| 26 | + | ||
| 27 | +artifacts { | ||
| 28 | + archives javadocJar | ||
| 29 | + archives sourcesJar | ||
| 30 | +} | ||
| 31 | + | ||
| 32 | +// Bintray | ||
| 33 | +Properties properties = new Properties() | ||
| 34 | +properties.load(project.rootProject.file('local.properties').newDataInputStream()) | ||
| 35 | + | ||
| 36 | +bintray { | ||
| 37 | + user = properties.getProperty("bintray.user") | ||
| 38 | + key = properties.getProperty("bintray.apikey") | ||
| 39 | + | ||
| 40 | + configurations = ['archives'] | ||
| 41 | + pkg { | ||
| 42 | + repo = bintrayRepo | ||
| 43 | + name = bintrayName | ||
| 44 | + desc = libraryDescription | ||
| 45 | + websiteUrl = siteUrl | ||
| 46 | + vcsUrl = gitUrl | ||
| 47 | + licenses = allLicenses | ||
| 48 | + publish = true | ||
| 49 | + publicDownloadNumbers = true | ||
| 50 | + version { | ||
| 51 | + desc = libraryDescription | ||
| 52 | + gpg { | ||
| 53 | + sign = true //Determines whether to GPG sign the files. The default is false | ||
| 54 | + passphrase = properties.getProperty("bintray.gpg.password") | ||
| 55 | + //Optional. The passphrase for GPG signing' | ||
| 56 | + } | ||
| 57 | + } | ||
| 58 | + } | ||
| 59 | +} | ||
| 0 | \ No newline at end of file | 60 | \ No newline at end of file |
cnlive/from_installv1.gradle
0 → 100644
| 1 | +apply plugin: 'com.github.dcendents.android-maven' | ||
| 2 | + | ||
| 3 | +group = publishedGroupId // Maven Group ID for the artifact | ||
| 4 | + | ||
| 5 | +install { | ||
| 6 | + repositories.mavenInstaller { | ||
| 7 | + // This generates POM.xml with proper parameters | ||
| 8 | + pom { | ||
| 9 | + project { | ||
| 10 | + packaging 'aar' | ||
| 11 | + groupId publishedGroupId | ||
| 12 | + artifactId artifact | ||
| 13 | + | ||
| 14 | + // Add your description here | ||
| 15 | + name libraryName | ||
| 16 | + description libraryDescription | ||
| 17 | + url siteUrl | ||
| 18 | + | ||
| 19 | + // Set your license | ||
| 20 | + licenses { | ||
| 21 | + license { | ||
| 22 | + name licenseName | ||
| 23 | + url licenseUrl | ||
| 24 | + } | ||
| 25 | + } | ||
| 26 | + developers { | ||
| 27 | + developer { | ||
| 28 | + id developerId | ||
| 29 | + name developerName | ||
| 30 | + email developerEmail | ||
| 31 | + } | ||
| 32 | + } | ||
| 33 | + scm { | ||
| 34 | + connection gitUrl | ||
| 35 | + developerConnection gitUrl | ||
| 36 | + url siteUrl | ||
| 37 | + | ||
| 38 | + } | ||
| 39 | + } | ||
| 40 | + } | ||
| 41 | + } | ||
| 42 | +} | ||
| 0 | \ No newline at end of file | 43 | \ No newline at end of file |
cnlive_libs_base/proguard-rules.pro renamed to cnlive/proguard-rules.pro
cnlive_libs_base/src/main/AndroidManifest.xml renamed to cnlive/src/main/AndroidManifest.xml
cnlive/src/main/java/com/cnlive/libs/base/Test.java
0 → 100644
cnlive_libs_base/src/main/res/values/strings.xml renamed to cnlive/src/main/res/values/strings.xml
settings.gradle