Skip to content

Commit

Permalink
修改发布jcenter为jitpack
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouzhuo810 committed Nov 6, 2018
1 parent 4de38e1 commit 79a0392
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 82 deletions.
3 changes: 3 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Excel表格生成工具
### Gradle:

```
compile 'me.zhouzhuo.zzexcelcreator:zz-excel-creator:1.0.2'
```


Expand Down
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ buildscript {
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0"
}
}

Expand Down
91 changes: 11 additions & 80 deletions zz-excel-creator/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'

version = "1.0.2"
group='com.github.zhouzhuo810'

android {
resourcePrefix "zz_" //随意填写
Expand Down Expand Up @@ -32,96 +31,28 @@ dependencies {
api files('libs/jxl.jar')
}

//添加下面这些才会有文档注释。

// build a jar with source files
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
/*

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
failOnError false
source = android.sourceSets.main.java.sourceFiles
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
options.encoding = "UTF-8"
classpath += configurations.compile
}

// build a jar with javadoc
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}*/
}

artifacts {
// archives javadocJar
archives sourcesJar
}

group = "me.zhouzhuo.zzexcelcreator" // Maven Group ID for the artifact,一般填你唯一的包名
install {
repositories.mavenInstaller {
pom.project {
packaging 'aar'
groupId 'me.zhouzhuo.zzexcelcreator' //自己定义的组名
artifactId 'zz-excel-creator'

name 'zz-excel-creator'
description 'A powerful tools to create Excel .xls file.'
url 'https://github.com/zhouzhuo810/ZzExcelCreator'
inceptionYear '2016'

licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
scm {
connection 'https://github.com/zhouzhuo810/ZzExcelCreator.git'
url 'https://github.com/zhouzhuo810/ZzExcelCreator'

}
developers {
developer {
name 'zhouzhuo810'
email '[email protected]'
}
}
}
}
}

// Bintray

//获取local.propertes的信息
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
publish = true
configurations = ['archives']
pkg {
//填入 bintray 上对应的 package 信息
repo = 'maven'
name = 'zz-excel-creator'
vcsUrl = 'https://github.com/zhouzhuo810/ZzExcelCreator.git'
websiteUrl = 'https://github.com/zhouzhuo810/ZzExcelCreator'
licenses = ['Apache-2.0']
issueTrackerUrl = 'https://github.com/zhouzhuo810/ZzExcelCreator/issues'
publicDownloadNumbers = true
version {
name = '1.0.2'
desc = 'zz-excel-creator release'
vcsTag = '1.0.2'
attributes = ['gradle-plugin': 'com.use.less:com.use.less.gradle:gradle-useless-plugin']
}
}
}

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}

task findConventions << {
println project.getConvention()
}
archives javadocJar
}

0 comments on commit 79a0392

Please sign in to comment.