Skip to content

Commit 0cf9fb6

Browse files
committed
Javadoc cleanups, publishing.
1 parent 4c4e2cb commit 0cf9fb6

File tree

8 files changed

+107
-8
lines changed

8 files changed

+107
-8
lines changed

TODO.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11

22
Porting to gradle
33

4-
- apply forbidden APIs
54
- packaging and sonatype/maven publishing
65
- remove maven artifacts (pom.xml, update readmes).
76

build.gradle

+6-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99
id 'de.thetaphi.forbiddenapis' version '3.0.1' apply false
1010
}
1111

12-
rootProject.version = '0.8.3-SNAPSHOT'
12+
rootProject.version = '0.9.0-SNAPSHOT'
1313
ext {
1414
fullName = "High Performance Primitive Collections"
1515
legal = files('LICENSE.txt')
@@ -22,11 +22,15 @@ apply from: file('gradle/validation/forbidden-apis.gradle')
2222
apply from: file('gradle/git/gitinfo.gradle')
2323
apply from: file('gradle/java/compiler.gradle')
2424
apply from: file('gradle/java/tests.gradle')
25-
25+
apply from: file('gradle/java/javadoc.gradle')
2626
apply from: file('gradle/ide/idea.gradle')
27+
apply from: file('gradle/publishing/maven.gradle')
2728

2829
allprojects {
2930
repositories {
3031
mavenCentral()
3132
}
33+
34+
version = rootProject.version
35+
group = "com.carrotsearch"
3236
}

gradle/java/javadoc.gradle

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
allprojects {
3+
plugins.withType(JavaPlugin) {
4+
tasks.withType(Javadoc) {
5+
options.encoding = 'UTF-8'
6+
title = "${project.name} ${project.version} API Documentation"
7+
8+
options.addBooleanOption('html5', true)
9+
options.addBooleanOption('Xdoclint:all,-missing', true)
10+
options.noIndex()
11+
}
12+
}
13+
}
14+

gradle/publishing/maven.gradle

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
2+
configure(rootProject) {
3+
ext {
4+
published = [
5+
":hppc",
6+
]
7+
}
8+
9+
configure(subprojects.findAll { it.path in rootProject.published }) {
10+
apply plugin: 'maven-publish'
11+
apply plugin: 'signing'
12+
13+
tasks.withType(GenerateModuleMetadata) {
14+
enabled = false
15+
}
16+
17+
plugins.withType(JavaPlugin) {
18+
publishing {
19+
repositories {
20+
maven {
21+
name = 'sonatype'
22+
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
23+
24+
credentials {
25+
if (project.hasProperty('nexusUsername')) {
26+
username project.nexusUsername
27+
}
28+
if (project.hasProperty('nexusPassword')) {
29+
password project.nexusPassword
30+
}
31+
}
32+
}
33+
}
34+
}
35+
36+
task sourcesJar(type: Jar, dependsOn: classes) {
37+
archiveClassifier = 'sources'
38+
from sourceSets.main.allJava
39+
}
40+
41+
task javadocJar(type: Jar, dependsOn: javadoc) {
42+
archiveClassifier = 'javadoc'
43+
from javadoc.destinationDir
44+
}
45+
46+
publishing {
47+
def configurePom = {
48+
name = "High Performance Primitive Collections"
49+
url = "https://github.com/carrotsearch/hppc"
50+
description = "High Performance Primitive Collections: " +
51+
"data structures (maps, sets, lists, stacks, queues) generated " +
52+
"for combinations of object and primitive types to conserve JVM " +
53+
"memory and speed up execution."
54+
55+
licenses {
56+
license {
57+
name = 'Apache 2'
58+
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
59+
}
60+
}
61+
}
62+
63+
publications {
64+
signed(MavenPublication) {
65+
from components.java
66+
groupId = project.group
67+
artifactId = project.archivesBaseName
68+
69+
artifact sourcesJar
70+
artifact javadocJar
71+
72+
pom(configurePom)
73+
}
74+
}
75+
}
76+
77+
signing {
78+
sign publishing.publications.signed
79+
}
80+
}
81+
}
82+
}

hppc/src/main/java/com/carrotsearch/hppc/HashOrderMixingStrategy.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public interface HashOrderMixingStrategy extends Cloneable {
2121
* A new key mixer value. The value can be derived from the new buffer size of the
2222
* container, but preferably should be random and unique.
2323
*
24-
* @param newContainerBufferSize
24+
* @param newContainerBufferSize New size of the calling container's buffer.
2525
*/
2626
public int newKeyMixer(int newContainerBufferSize);
2727

hppc/src/main/templates/com/carrotsearch/hppc/KTypeScatterSet.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
* strategy and uses a simpler (faster) bit distribution function.
1010
*
1111
* <p>
12-
* <strong>Note:</strong> read about <a href="{@docRoot}
13-
* /overview-summary.html#scattervshash">important differences between hash and
12+
* <strong>Note:</strong> read about
13+
* <a href="{@docRoot}/overview-summary.html#scattervshash">important differences between hash and
1414
* scatter sets</a>.
1515
* </p>
1616
*

hppc/src/main/templates/com/carrotsearch/hppc/KTypeVTypeMap.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public interface KTypeVTypeMap<KType, VType> extends KTypeVTypeAssociativeContai
9595

9696
/**
9797
* Compares the specified object with this set for equality. Returns
98-
* <tt>true</tt> if and only if the specified object is also a
98+
* {@code true} if and only if the specified object is also a
9999
* {@link KTypeVTypeMap} and both objects contains exactly the same key-value
100100
* pairs.
101101
*/

settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
rootProject.name = 'hppc'
2+
rootProject.name = 'hppc-root'
33

44
include 'hppc-template-intrinsics'
55
include 'hppc-template-processor'

0 commit comments

Comments
 (0)