Skip to content

Commit ef30a49

Browse files
authored
Merge pull request #3 from devxchangeio/gradle_cleanup
version-1.0.0
2 parents a9c814c + d7e49a9 commit ef30a49

11 files changed

Lines changed: 47 additions & 392 deletions

File tree

build.gradle

Lines changed: 43 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,31 @@ buildscript {
77
jcenter()
88
}
99
dependencies {
10-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.1'
1110
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
11+
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.1.1"
12+
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4"
1213
}
1314
}
1415

1516
apply plugin: 'java'
1617
apply plugin: 'eclipse'
1718
apply plugin: 'maven-publish'
1819
apply plugin: 'maven'
20+
apply plugin: 'com.jfrog.artifactory'
1921
apply plugin: 'com.jfrog.bintray'
2022

2123

2224
group 'io.devxchange'
23-
version '1.0.0'
24-
archivesBaseName = "logmetrics"
25-
26-
27-
sourceCompatibility = 1.8
25+
version '1.0.0-SNAPSHOT'
2826

2927
repositories {
3028
mavenCentral()
3129
maven { url "https://repo.spring.io/snapshot" }
3230
maven { url "https://repo.spring.io/milestone" }
3331
}
3432

35-
3633
dependencies {
34+
compile gradleApi()
3735
compile group: 'org.springframework', name: 'spring-webmvc', version: '4.3.2.RELEASE'
3836
compile("javax.servlet:javax.servlet-api:3.1.0")
3937
compile group: 'commons-io', name: 'commons-io', version: '2.4'
@@ -44,53 +42,64 @@ dependencies {
4442
compile group: 'commons-collections', name: 'commons-collections', version: '3.0'
4543
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.8.4'
4644
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.8.4'
47-
4845
}
4946

50-
// custom tasks for creating source/javadoc jars
51-
task sourcesJar(type: Jar, dependsOn: classes) {
52-
classifier = 'sources'
53-
from sourceSets.main.allSource
47+
def javaApiUrl = 'http://docs.oracle.com/javase/1.7.0/docs/api/'
48+
tasks.withType(Javadoc) {
49+
options.links(javaApiUrl)
5450
}
5551

5652
task javadocJar(type: Jar, dependsOn: javadoc) {
5753
classifier = 'javadoc'
58-
from javadoc.destinationDir
54+
from 'build/docs/javadoc'
55+
}
56+
57+
task sourcesJar(type: Jar) {
58+
from sourceSets.main.allSource
59+
classifier = 'sources'
5960
}
6061

61-
artifacts {
62-
archives sourcesJar, javadocJar
62+
def pomConfig = {
63+
licenses {
64+
license {
65+
name "The Apache Software License, Version 2.0"
66+
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
67+
distribution "repo"
68+
}
69+
}
70+
developers {
71+
developer {
72+
id "sadayamuthu"
73+
name "Karthikeyan Sadayamuthu"
74+
email "ksadayamuthu@outlook.com"
75+
}
76+
}
6377
}
6478

6579
publishing {
6680
publications {
67-
MyPublication(MavenPublication) {
81+
mavenJava(MavenPublication) {
6882
from components.java
69-
groupId 'io.devxchange'
70-
artifactId 'logmetrics'
71-
version '1.0.0'
83+
artifact sourcesJar
84+
artifact javadocJar
85+
86+
pom.withXml {
87+
def root = asNode()
88+
root.appendNode('description', 'LogMetrics for Java Projects')
89+
root.children().last() + pomConfig
90+
}
7291
}
7392
}
7493
}
7594

7695
bintray {
77-
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
78-
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
79-
publications = ['MyPublicaiton']
80-
dryRun = false
81-
publish = true
96+
user = project.hasProperty('bintrayUser') ? project.bintrayUser : System.getenv('BINTRAY_USER')
97+
key = project.hasProperty('bintrayKey') ? project.bintrayKey : System.getenv('BINTRAY_KEY')
98+
publications = ['mavenJava']
8299
pkg {
83-
repo = 'logmetrics'
84-
name = 'logmetrics-java'
100+
repo = 'maven-repo'
85101
userOrg = 'devxchange'
102+
name = 'logmetrics'
86103
licenses = ['Apache-2.0']
87-
vcsUrl = 'https://github.com/devxchangeio/logmetrics-java.git'
88-
labels = ['devxchangeio', 'logmetrics']
89-
publicDownloadNumbers = true
90-
attributes= ['a': ['ay1', 'ay2'], 'b': ['bee'], c: 'cee'] //Optional package-level attributes
91-
version {
92-
name = '1.0.0-Final'
93-
desc = 'LogMetrics for Java Projects 1.0 final'
94-
}
95104
}
96105
}

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
bintrayUser=sadayamuthu
2-
bintrayApiKey=9910ec2fb663a78db66b629eb1bdf836343ae2f4
1+
bintrayUser=
2+
bintrayKey=

logmetrics-java/build.gradle

Lines changed: 0 additions & 29 deletions
This file was deleted.

logmetrics-java/gradle/wrapper/gradle-wrapper.properties

Lines changed: 0 additions & 5 deletions
This file was deleted.

logmetrics-java/gradlew

Lines changed: 0 additions & 188 deletions
This file was deleted.

0 commit comments

Comments
 (0)