mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-02 17:57:09 +08:00
GP-933 fixing gradle warnings to prepare for Gradle 8
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
/* ###
|
||||
* IP: GHIDRA
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
/*****************************************************************************************
|
||||
This file is a "mix-in" gradle script that individual gradle projects should include if they
|
||||
have java code and want javadocs generated for that project
|
||||
|
||||
A gradle project can add javadoc support by including the following to its build.gradle file:
|
||||
apply from: "$rootProject.projectDir/gradle/javadoc.gradle"
|
||||
*****************************************************************************************/
|
||||
|
||||
rootProject.createJavadocs {
|
||||
source sourceSets.main.allJava
|
||||
}
|
||||
|
||||
rootProject.createJsondocs {
|
||||
source sourceSets.main.allJava
|
||||
}
|
||||
@@ -46,17 +46,6 @@ if (extensionsList.isFile()) {
|
||||
}
|
||||
}
|
||||
|
||||
FileTree javadocFiles = fileTree (rootProject.projectDir.toString()) {
|
||||
include '**/Framework/**/*.java'
|
||||
include '**/Features/Base/src/main/java/**/*.java'
|
||||
exclude '**/Features/Base/src/main/java/ghidra/app/plugin/**/*.java';
|
||||
include '**/Features/Decompiler/src/main/java/ghidra/app/decompiler/**/*.java'
|
||||
include '**/Features/Python/**/*.java'
|
||||
exclude '**/GhidraBuild/**/*.java';
|
||||
exclude '**/src/test/**'
|
||||
exclude '**/src/test.slow/**'
|
||||
exclude '**/pcodeCPort/**' // not intended for general consumption
|
||||
}
|
||||
ext.ghidraPath = files()
|
||||
|
||||
/********************************************************************************
|
||||
@@ -122,12 +111,14 @@ task createJavadocs(type: Javadoc, description: 'Generate javadocs for all proje
|
||||
destinationDir file(rootProject.projectDir.toString() + "/build/tmp/javadoc")
|
||||
|
||||
failOnError false
|
||||
|
||||
// the "source" property must be set in individual project's build.gradle files.
|
||||
// projects that want to be included in the Jsondocs should add the following to
|
||||
// their build.gradle file:
|
||||
//
|
||||
// apply from: "$rootProject.projectDir/gradle/javadoc.gradle"
|
||||
//
|
||||
|
||||
// Here for reference. If we want to turn on javadoc for all source files, uncomment
|
||||
// the following line (and comment out the next one):
|
||||
// source subprojects.collect { it.sourceSets.main.allJava }
|
||||
source javadocFiles
|
||||
|
||||
// Must add classpath for main and test source sets. Javadoc will fail if it cannot
|
||||
// find referenced classes.
|
||||
classpath = rootProject.ext.ghidraPath
|
||||
@@ -170,6 +161,7 @@ configurations {
|
||||
dependencies {
|
||||
jsondoc project('JsonDoclet')
|
||||
}
|
||||
|
||||
|
||||
task createJsondocs(type: Javadoc, description: 'Generate JSON docs for all projects', group: 'Documentation') {
|
||||
|
||||
@@ -181,15 +173,19 @@ task createJsondocs(type: Javadoc, description: 'Generate JSON docs for all proj
|
||||
|
||||
failOnError false
|
||||
|
||||
// Here for reference. If we want to turn on javadoc for all source files, uncomment
|
||||
// the following line (and comment out the next one):
|
||||
// source subprojects.collect { it.sourceSets.main.allJava }
|
||||
source javadocFiles
|
||||
|
||||
// Must add classpath for main and test source sets. Javadoc will fail if it cannot
|
||||
// find referenced classes.
|
||||
classpath = rootProject.ext.ghidraPath
|
||||
|
||||
// the "source" property must be set in individual project's build.gradle files.
|
||||
// projects that want to be included in the Jsondocs should add the following to
|
||||
// their build.gradle file:
|
||||
//
|
||||
// apply from: "$rootProject.projectDir/gradle/javadoc.gradle"
|
||||
//
|
||||
|
||||
|
||||
// Generate at package level because user may try to get help directly on an object they have
|
||||
// rather than its public interface.
|
||||
options.addBooleanOption("package", true)
|
||||
|
||||
Reference in New Issue
Block a user