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 79a0392 commit 55e4497
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 15 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,21 @@ Excel表格生成工具

### Gradle:

```
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```

```
dependencies {
implementation 'com.github.zhouzhuo810:ZzExcelCreator:1.0.1'
}
```



### 创建Excel文件和工作表
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

buildscript {
repositories {
jcenter()
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'

// 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'
}
}

allprojects {
repositories {
jcenter()
google()
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
}
21 changes: 10 additions & 11 deletions zz-excel-creator/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.github.dcendents.android-maven' // 添加这个

group='com.github.zhouzhuo810'
group = 'com.github.zhouzhuo810' // 指定group,com.github.<用户名>

android {
resourcePrefix "zz_" //随意填写

compileSdkVersion 27

defaultConfig {
minSdkVersion 14
targetSdkVersion 25
targetSdkVersion 27
versionCode 3
versionName "1.2"
}
Expand All @@ -30,23 +27,25 @@ android {
dependencies {
api files('libs/jxl.jar')
}
// 指定编码
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}

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

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

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

// build a jar with javadoc
// 制作文档(Javadoc)
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
Expand Down

0 comments on commit 55e4497

Please sign in to comment.