-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
91 lines (74 loc) · 2.47 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
plugins {
id "com.jfrog.bintray" version "1.8.4"
}
apply plugin: "java"
apply plugin: "maven"
apply plugin: "maven-publish"
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile gradleApi()
compile "org.jasypt:jasypt:1.9.3"
testCompile "junit:junit:4.12"
}
// ###################################
// ### Publish to local maven repo ###
// ###################################
// custom tasks for creating source/javadoc jars
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
// add javadoc/source jar tasks as artifacts
artifacts {
archives sourcesJar, javadocJar
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
afterEvaluate {
groupId = project.group
}
}
}
}
// ##########################
// ### Publish to bintray ###
// ##########################
bintray {
user = project.hasProperty('BINTRAY_USER') ? BINTRAY_USER : null //this usually comes from gradle.properties file in ~/.gradle
key = project.hasProperty('BINTRAY_API_KEY') ? BINTRAY_API_KEY : null //this usually comes from gradle.properties file in ~/.gradle
// configurations = ['archives'] //When uploading configuration files
// - OR -
publications = ['mavenJava'] //When uploading Maven-based publication files
dryRun = false //Whether to run this as dry-run, without deploying
publish = false //If version should be auto published after an upload
// Package configuration. The plugin will use the repo and name properties to check if the package already exists.
// In that case, there's no need to configure the other package properties (like userOrg, desc, etc).
pkg {
repo = 'maven'
name = 'jasypt-gradle-plugin'
//userOrg = 'byteowls' //An optional organization name when the repo belongs to one of the user's orgs
desc = 'Jasypt value encryption plugin for Gradle 4.10.+'
websiteUrl = 'https://github.com/moberwasserlechner/jasypt-gradle-plugin'
issueTrackerUrl = 'https://github.com/moberwasserlechner/jasypt-gradle-plugin/issues'
vcsUrl = 'https://github.com/moberwasserlechner/jasypt-gradle-plugin.git'
licenses = ['MIT']
labels = ['jasypt', 'gradle', 'encryption']
publicDownloadNumbers = true
version {
name = project.version //Bintray logical version name
// desc = 'optional'
vcsTag = project.version
}
}
}