Skip to content

Commit

Permalink
feat(build): add javadoc.jar and source.jaar generation
Browse files Browse the repository at this point in the history
Signed-off-by: Teclib <skita@teclib.com>
  • Loading branch information
stonebuzz committed Nov 7, 2019
1 parent 9dfe456 commit 3357459
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,14 @@ Download the latest JAR, grab via Maven, insert on `build.gradle` at app level o
</dependency>
```

### Gradle
### Gradle app

```groovy
compile 'org.flyve:inventory:1.0.0'
implementation 'org.flyve:inventory:1.1.0@aar'
```



### Apache Ivy

```
Expand Down
31 changes: 31 additions & 0 deletions inventory/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ android {
}
}

configurations {
javadocDeps
}


dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
Expand Down Expand Up @@ -51,6 +56,32 @@ ext {
libraryName = 'inventory'
artifact = 'inventory'




task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

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

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives javadocJar
archives sourcesJar
}


libraryDescription = 'Inventory client library written in Java for developing applications on Android'

siteUrl = 'https://github.com/flyve-mdm/android-inventory-library'
Expand Down

0 comments on commit 3357459

Please sign in to comment.