@@ -5,7 +5,10 @@ plugins {
55
66apply plugin : ' java'
77apply plugin : ' idea'
8- version = ' 1.0'
8+ apply plugin : ' com.jfrog.bintray'
9+ apply plugin : ' maven'
10+
11+ version = ' 1.0.0'
912
1013repositories {
1114 mavenCentral()
@@ -16,4 +19,68 @@ dependencies {
1619 testCompile group : ' junit' , name : ' junit' , version : ' 4.11'
1720 testCompile group : ' com.tngtech.java' , name : ' junit-dataprovider' , version : ' 1.9.2'
1821 testCompile " org.mockito:mockito-core:1.+"
19- }
22+ }
23+
24+ def siteUrl = ' https://github.com/egulias/EmailValidator4J'
25+ def gitUrl = ' https://github.com/egulias/EmailValidator4J.git'
26+ group = " egulias"
27+
28+ Properties properties = new Properties ()
29+ properties. load(project. rootProject. file(' local.properties' ). newDataInputStream())
30+
31+
32+ task createPom << {
33+ pom {
34+ project {
35+ groupId ' emailvalidator4j'
36+ artifactId ' emailvalidator4j-1.0.0'
37+ version ' 1.0.0'
38+
39+ inceptionYear ' 2015'
40+ licenses {
41+ license {
42+ name ' MIT'
43+ url ' http://opensource.org/licenses/mit-license.php'
44+ distribution ' repo'
45+ }
46+ }
47+ }
48+ }. writeTo(" pom.xml" )
49+ }
50+
51+ bintray {
52+ user = properties. getProperty(" bintray.user" )
53+ key = properties. getProperty(" bintray.apikey" )
54+
55+ configurations = [' archives' ]
56+ pkg {
57+ repo = " maven"
58+ name = " EmailValidator4J"
59+ websiteUrl = siteUrl
60+ vcsUrl = gitUrl
61+ licenses = [" MIT" ]
62+ labels = [' email' , ' validator' , ' email validation' ]
63+ issueTrackerUrl = ' https://github.com/egulias/EmailValidator4J/issues'
64+ publish = true
65+ version {
66+ name = ' 1.0.0' // Bintray logical version name
67+ desc = ' First release'
68+ vcsTag = ' 1.0.0'
69+ }
70+ }
71+ }
72+
73+ task sourceJar (type : Jar ) {
74+ from sourceSets. main. allJava
75+ classifier ' sources'
76+ }
77+
78+ task javadocJar (type : Jar , dependsOn : javadoc) {
79+ classifier = ' javadoc'
80+ from javadoc. destinationDir
81+ }
82+
83+ artifacts {
84+ archives javadocJar
85+ archives sourceJar
86+ }
0 commit comments