This is an automated email from the ASF dual-hosted git repository.

abulatski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git


The following commit(s) were added to refs/heads/master by this push:
     new a5e525e  Attach sources and javadoc in cayenne-gradle-plugin build
a5e525e is described below

commit a5e525ee13b1183458a7cd41068985d0affb19da
Author: Arseni Bulatski <ancars...@gmail.com>
AuthorDate: Mon Mar 25 17:55:01 2019 +0300

    Attach sources and javadoc in cayenne-gradle-plugin build
---
 cayenne-gradle-plugin/build.gradle | 15 +++++++++++++++
 cayenne-gradle-plugin/pom.xml      | 10 ++++++++++
 2 files changed, 25 insertions(+)

diff --git a/cayenne-gradle-plugin/build.gradle 
b/cayenne-gradle-plugin/build.gradle
index b75d626..dc13018 100644
--- a/cayenne-gradle-plugin/build.gradle
+++ b/cayenne-gradle-plugin/build.gradle
@@ -74,5 +74,20 @@ task licenseFiles(type: Copy) {
     into "$buildDir/resources/main/"
 }
 
+task sourcesJar(type: Jar, dependsOn: classes) {
+    classifier = 'sources'
+    from sourceSets.main.allSource
+}
+
+task javadocJar(type: Jar, dependsOn: javadoc) {
+    classifier = 'javadoc'
+    from javadoc.destinationDir
+}
+
+artifacts {
+    archives sourcesJar
+    archives javadocJar
+}
+
 processResources.dependsOn licenseFiles
 processResources.dependsOn versionFile
\ No newline at end of file
diff --git a/cayenne-gradle-plugin/pom.xml b/cayenne-gradle-plugin/pom.xml
index 512b7cc..47507d7 100644
--- a/cayenne-gradle-plugin/pom.xml
+++ b/cayenne-gradle-plugin/pom.xml
@@ -122,6 +122,16 @@
                                     
<file>build/libs/${project.artifactId}-${project.version}.jar</file>
                                     <type>jar</type>
                                 </artifact>
+                                <artifact>
+                                    
<file>build/libs/${project.artifactId}-${project.version}-sources.jar</file>
+                                    <type>jar</type>
+                                    <classifier>sources</classifier>
+                                </artifact>
+                                <artifact>
+                                    
<file>build/libs/${project.artifactId}-${project.version}-javadoc.jar</file>
+                                    <type>jar</type>
+                                    <classifier>javadoc</classifier>
+                                </artifact>
                             </artifacts>
                         </configuration>
                     </execution>

Reply via email to