better compile, do not publish gradle plugin to sonatype

This commit is contained in:
Jörg Prante 2020-06-04 07:21:40 +02:00
parent 9b47af7fdb
commit 9633d9f48f
9 changed files with 22 additions and 9 deletions

View file

@ -28,6 +28,5 @@ subprojects {
apply from: rootProject.file('gradle/ide/idea.gradle') apply from: rootProject.file('gradle/ide/idea.gradle')
apply from: rootProject.file('gradle/compile/java.gradle') apply from: rootProject.file('gradle/compile/java.gradle')
apply from: rootProject.file('gradle/test/junit5.gradle') apply from: rootProject.file('gradle/test/junit5.gradle')
apply from: rootProject.file('gradle/publishing/publication.gradle')
} }
apply from: rootProject.file('gradle/publishing/sonatype.gradle') apply from: rootProject.file('gradle/publishing/sonatype.gradle')

View file

@ -1,11 +1,11 @@
group = org.xbib group = org.xbib
name = rpm name = rpm
version = 2.0.0 version = 2.0.1
gradle.wrapper.version = 6.4.1 gradle.wrapper.version = 6.4.1
gradle.publish.plugin.version = 0.11.0 gradle.publish.plugin.version = 0.11.0
bouncycastle.version = 1.64 bouncycastle.version = 1.64
xbib-archive.version = 1.0.0 xbib-archive.version = 1.0.1
ant.version = 1.10.8 ant.version = 1.10.8
maven.version = 3.6.3 maven.version = 3.6.3
maven-plugin-annotations.version = 3.6.0 maven-plugin-annotations.version = 3.6.0

View file

@ -33,3 +33,11 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
artifacts { artifacts {
archives sourcesJar, javadocJar archives sourcesJar, javadocJar
} }
tasks.withType(JavaCompile) {
options.compilerArgs << '-Xlint:all,-fallthrough'
}
javadoc {
options.addStringOption('Xdoclint:none', '-quiet')
}

View file

@ -71,3 +71,5 @@ task generatePluginDescriptor(type: JavaExec, dependsOn: compileJava) {
} }
project.jar.dependsOn(generatePluginDescriptor) project.jar.dependsOn(generatePluginDescriptor)
apply from: rootProject.file('gradle/publishing/publication.gradle')

View file

@ -2,3 +2,5 @@ dependencies {
api project(':rpm-core') api project(':rpm-core')
implementation "org.apache.ant:ant:${project.property('ant.version')}" implementation "org.apache.ant:ant:${project.property('ant.version')}"
} }
apply from: rootProject.file('gradle/publishing/publication.gradle')

View file

@ -3,3 +3,5 @@ dependencies {
api "org.xbib:io-compress-bzip2:${project.property('xbib-archive.version')}" api "org.xbib:io-compress-bzip2:${project.property('xbib-archive.version')}"
api "org.xbib:io-compress-xz:${project.property('xbib-archive.version')}" api "org.xbib:io-compress-xz:${project.property('xbib-archive.version')}"
} }
apply from: rootProject.file('gradle/publishing/publication.gradle')

View file

@ -11,8 +11,8 @@ module org.xbib.rpm {
exports org.xbib.rpm.security; exports org.xbib.rpm.security;
exports org.xbib.rpm.signature; exports org.xbib.rpm.signature;
exports org.xbib.rpm.trigger; exports org.xbib.rpm.trigger;
requires org.bouncycastle.pg; requires transitive org.bouncycastle.pg;
requires org.bouncycastle.provider; requires transitive org.bouncycastle.provider;
requires org.xbib.io.compress.bzip; requires org.xbib.io.compress.bzip;
requires org.xbib.io.compress.xz; requires org.xbib.io.compress.xz;
} }

View file

@ -203,9 +203,9 @@ public abstract class AbstractHeader {
if (existingValues == null) { if (existingValues == null) {
entry.setValues(values); entry.setValues(values);
} else if (existingValues instanceof Collection) { } else if (existingValues instanceof Collection) {
Collection collection = (Collection) existingValues; Collection<T> collection = (Collection<T>) existingValues;
if (values instanceof Collection) { if (values instanceof Collection) {
Collection valuesCollection = (Collection) values; Collection<T> valuesCollection = (Collection<T>) values;
collection.addAll(valuesCollection); collection.addAll(valuesCollection);
} else { } else {
collection.add(values); collection.add(values);

View file

@ -28,7 +28,7 @@ public class ReadableChannelWrapper extends ChannelWrapper implements ReadableBy
public int read(final ByteBuffer buffer) throws IOException { public int read(final ByteBuffer buffer) throws IOException {
final int read = channel.read(buffer); final int read = channel.read(buffer);
for (Consumer<?> consumer : consumers.values()) { for (Consumer<?> consumer : consumers.values()) {
consumer.consume((ByteBuffer) buffer.duplicate().flip()); consumer.consume(buffer.duplicate().flip());
} }
return read; return read;
} }