Skip to content

Commit 5ef0bba

Browse files
committed
Readme updates and build for bintray
1 parent ffab0cd commit 5ef0bba

File tree

3 files changed

+75
-5
lines changed

3 files changed

+75
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ build
33
*.iws
44
*.iml
55
.gradle
6+
local.properties

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# EmailValidator4J
22
[![Build Status](https://travis-ci.org/egulias/EmailValidator4J.svg?branch=master)](https://travis-ci.org/egulias/EmailValidator4J)
3+
[![Download](https://api.bintray.com/packages/egulias/maven/EmailValidator4J/images/download.svg) ](https://bintray.com/egulias/maven/EmailValidator4J/_latestVersion)
34

45
Simple RFC compliant EmailValidator for Java.
56

@@ -13,14 +14,15 @@ EmailValidator4j is available on [JCenter]!!!
1314

1415
```groovy
1516
dependencies {
17+
compile 'egulias:emailvalidator4j:1.0.0'
1618
}
1719
```
1820

1921
```xml
2022
<dependency>
21-
<groupId></groupId>
22-
<artifactId></artifactId>
23-
<version></version>
23+
<groupId>egulias</groupId>
24+
<artifactId>emailvalidator4j</artifactId>
25+
<version>1.0.0</version>
2426
</dependency>
2527
```
2628

build.gradle

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ plugins {
55

66
apply plugin: 'java'
77
apply plugin: 'idea'
8-
version = '1.0'
8+
apply plugin: 'com.jfrog.bintray'
9+
apply plugin: 'maven'
10+
11+
version = '1.0.0'
912

1013
repositories {
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

Comments
 (0)