Skip to content

Commit 1d954f3

Browse files
committed
+ gradle build
+ wrapper + gpg signing + updates group name for maven central req's + updates README with central repo deps
1 parent e564c3c commit 1d954f3

8 files changed

Lines changed: 368 additions & 14 deletions

File tree

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,23 @@ The current release is `1.0.2`, and contains several fixes, cosmetic improvement
1010
the output, and some improved functionality for inner classes to support the
1111
development of [Flapi](https://github.com/UnquietCode/Flapi).
1212

13-
Many thanks to the original contributors, namely Kohsuke.
13+
Many thanks to the original contributors, namely @Kohsuke.
1414

15-
#Using
16-
Using Maven-style dependencies & repositories, add this information:
17-
```
18-
<repositories>
19-
<repository>
20-
<id>uqc</id>
21-
<name>UnquietCode Repository</name>
22-
<url>http://www.unquietcode.com/maven/releases</url>
23-
</repository>
24-
</repositories>
25-
26-
...
15+
## Usage
16+
The dependencies are deployed to Maven Central. To use, add the following to your build script:
2717

18+
### Maven
19+
```xml
2820
<dependency>
29-
<groupId>unquietcode.tools.jcodemodel</groupId>
21+
<groupId>com.unquietcode.tools.jcodemodel</groupId>
3022
<artifactId>codemodel</artifactId>
3123
<version>1.0.2</version>
3224
</dependency>
3325
```
26+
27+
### Gradle
28+
```groovy
29+
dependencies {
30+
compile 'com.unquietcode.tools.jcodemodel:codemodel:1.0.2'
31+
}
32+
```

build.gradle

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
allprojects {
2+
apply plugin: 'maven'
3+
4+
group = 'com.unquietcode.tools.jcodemodel'
5+
version = '1.0.2'
6+
}
7+
8+
subprojects {
9+
repositories {
10+
mavenCentral()
11+
}
12+
}
13+
14+
task wrapper(type: Wrapper) {
15+
gradleVersion = '2.3'
16+
}

codemodel/build.gradle

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
apply plugin: 'java'
2+
apply plugin: 'signing'
3+
4+
description = 'The core functionality of the CodeModel Java source code generation library'
5+
sourceCompatibility = 1.5
6+
targetCompatibility = 1.5
7+
8+
dependencies {
9+
testCompile group: 'junit', name: 'junit', version:'4.11'
10+
testCompile group: 'com.google.code.javaparser', name: 'javaparser', version:'1.0.8'
11+
}
12+
13+
task sourcesJar(type: Jar, dependsOn: classes) {
14+
classifier = 'sources'
15+
from sourceSets.main.allSource
16+
}
17+
18+
task javadocJar(type: Jar, dependsOn: javadoc) {
19+
classifier = 'javadoc'
20+
from javadoc.destinationDir
21+
}
22+
23+
artifacts {
24+
archives sourcesJar
25+
archives javadocJar
26+
}
27+
28+
uploadArchives {
29+
repositories {
30+
mavenDeployer {
31+
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
32+
33+
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
34+
authentication(userName: ossrhUsername, password: ossrhPassword)
35+
}
36+
37+
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
38+
authentication(userName: ossrhUsername, password: ossrhPassword)
39+
}
40+
41+
pom.project {
42+
name 'Codemodel Core'
43+
description project.description
44+
45+
packaging 'jar'
46+
url 'https://github.com/UnquietCode/JCodeModel'
47+
48+
scm {
49+
connection 'scm:git:https://github.com/UnquietCode/JCodeModel.git'
50+
developerConnection 'scm:git:https://github.com/UnquietCode/JCodeModel.git'
51+
url 'https://github.com/UnquietCode/JCodeModel'
52+
}
53+
54+
licenses {
55+
license {
56+
name 'The Apache License, Version 2.0'
57+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
58+
}
59+
}
60+
61+
developers {
62+
developer {
63+
id 'UnquietCode'
64+
name 'Benjamin Fagin'
65+
email 'blouis@unquietcode.com'
66+
}
67+
}
68+
}
69+
}
70+
}
71+
}
72+
73+
signing {
74+
sign configurations.archives
75+
}

gradle/wrapper/gradle-wrapper.jar

49.8 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Tue Apr 14 11:40:05 PDT 2015
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-bin.zip

gradlew

Lines changed: 164 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 90 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)