Generate javadoc jar for painless's public API (#22704)

The simplest way to do that is to move the public API into a
new package and generate javadoc for that package.
This commit is contained in:
Nik Everett 2017-01-23 17:16:20 -05:00 committed by GitHub
parent 2e399e5505
commit 28cfc533e2
5 changed files with 38 additions and 1 deletions

View File

@ -52,3 +52,15 @@ integTest {
setting 'script.max_compilations_per_minute', '1000'
}
}
// Build
task apiJavadoc(type: Javadoc) {
source = sourceSets.main.allJava
include '**/org/elasticsearch/painless/api/'
destinationDir = new File(docsDir, 'apiJavadoc')
}
task apiJavadocJar(type: Jar) {
classifier = 'apiJavadoc'
from apiJavadoc
}
assemble.dependsOn apiJavadocJar

View File

@ -21,6 +21,7 @@ package org.elasticsearch.painless;
import org.apache.lucene.util.Constants;
import org.apache.lucene.util.SetOnce;
import org.elasticsearch.painless.api.Augmentation;
import java.io.InputStream;
import java.io.InputStreamReader;

View File

@ -20,6 +20,7 @@
package org.elasticsearch.painless;
import org.apache.lucene.search.Scorer;
import org.elasticsearch.painless.api.Augmentation;
import org.elasticsearch.search.lookup.LeafDocLookup;
import org.objectweb.asm.Handle;
import org.objectweb.asm.Opcodes;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.painless;
package org.elasticsearch.painless.api;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;

View File

@ -0,0 +1,23 @@
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
* Java code publicly exposed to Painless code.
*/
package org.elasticsearch.painless.api;