mirror of
https://github.com/corda/corda.git
synced 2025-04-09 04:15:35 +00:00
Added the default publish tasks to a publish utils repo.
This commit is contained in:
parent
6d36ec8759
commit
f6561c6f72
20
plugins/publish-utils/build.gradle
Normal file
20
plugins/publish-utils/build.gradle
Normal file
@ -0,0 +1,20 @@
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'groovy'
|
||||
|
||||
dependencies {
|
||||
compile gradleApi()
|
||||
compile localGroovy()
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
core(MavenPublication) {
|
||||
from components.java
|
||||
artifactId 'publish-utils'
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
import org.gradle.api.*
|
||||
import org.gradle.api.tasks.bundling.Jar
|
||||
import org.gradle.api.tasks.javadoc.Javadoc
|
||||
|
||||
/**
|
||||
* A utility plugin that when applied will automatically create source and javadoc publishing tasks
|
||||
*/
|
||||
class DefaultPublishTasks implements Plugin<Project> {
|
||||
void apply(Project project) {
|
||||
project.task("sourceJar", type: Jar, dependsOn: project.classes) {
|
||||
classifier = 'sources'
|
||||
from project.sourceSets.main.allSource
|
||||
}
|
||||
|
||||
project.task("javadocJar", type: Jar, dependsOn: project.javadoc) {
|
||||
classifier = 'javadoc'
|
||||
from project.javadoc.destinationDir
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
implementation-class=com.r3corda.DefaultPublishTasks
|
2
plugins/quasar-utils/gradle.properties
Normal file
2
plugins/quasar-utils/gradle.properties
Normal file
@ -0,0 +1,2 @@
|
||||
group = com.r3corda
|
||||
version = 1.0
|
Loading…
x
Reference in New Issue
Block a user