mirror of https://github.com/alibaba/p3c.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
100 lines
2.7 KiB
Groovy
100 lines
2.7 KiB
Groovy
plugins {
|
|
id "org.jetbrains.intellij" version '0.2.17'
|
|
}
|
|
apply plugin: 'kotlin'
|
|
apply plugin: 'idea'
|
|
apply plugin: 'maven'
|
|
apply plugin: 'signing'
|
|
|
|
javadoc {
|
|
options.tags = [ "date" ]
|
|
}
|
|
|
|
task javadocJar(type: Jar, dependsOn: javadoc) {
|
|
classifier = 'javadoc'
|
|
from 'build/docs/javadoc'
|
|
}
|
|
|
|
task sourcesJar(type: Jar) {
|
|
classifier = 'sources'
|
|
from sourceSets.main.allSource
|
|
}
|
|
|
|
artifacts {
|
|
archives jar
|
|
archives javadocJar
|
|
archives sourcesJar
|
|
}
|
|
|
|
intellij {
|
|
version idea_version
|
|
pluginName plugin_name
|
|
updateSinceUntilBuild false
|
|
sandboxDirectory "$project.buildDir/idea-sandbox/$idea_version"
|
|
}
|
|
version '1.0.0'
|
|
|
|
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
|
|
|
|
dependencies {
|
|
compile group: 'org.freemarker', name: 'freemarker', version: '2.3.25-incubating'
|
|
compile 'com.alibaba.p3c:p3c-pmd:1.3.0'
|
|
compile group: 'org.javassist', name: 'javassist', version: '3.21.0-GA'
|
|
}
|
|
|
|
uploadArchives {
|
|
repositories {
|
|
mavenDeployer {
|
|
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
|
|
|
|
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
|
|
authentication(userName: findProperty('ossrhUsername'), password: findProperty('ossrhPassword'))
|
|
}
|
|
|
|
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
|
|
authentication(userName: findProperty('ossrhUsername'), password: findProperty('ossrhPassword'))
|
|
}
|
|
|
|
pom.project {
|
|
name 'p3c-common'
|
|
packaging 'jar'
|
|
description 'P3c Idea Plugin Common.'
|
|
url 'https://github.com/alibaba/p3c'
|
|
|
|
scm {
|
|
url 'https://github.com/alibaba/p3c'
|
|
connection 'scm:git:https://git@github.com/alibaba/p3c.git'
|
|
}
|
|
|
|
licenses {
|
|
license {
|
|
name 'The Apache Software License, Version 2.0'
|
|
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
|
distribution 'repo'
|
|
}
|
|
}
|
|
|
|
developers {
|
|
developer {
|
|
id 'junlie'
|
|
name 'Junlie'
|
|
email 'sean.caikang@gmail.com'
|
|
}
|
|
developer {
|
|
id 'ZengHou'
|
|
name 'ZengHou'
|
|
email 'fengwei1983@gmail.com'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
signing {
|
|
required {
|
|
isReleaseVersion && gradle.taskGraph.hasTask("uploadArchives")
|
|
}
|
|
sign configurations.archives
|
|
}
|