Skip to content

Commit

Permalink
Build performance improvements (#3926) (#3937)
Browse files Browse the repository at this point in the history
* set appropiate jdk boolean for buildNoJdkRpm

Signed-off-by: Inaki Villar <[email protected]>

* make missingJavadoc cacheable

Signed-off-by: Inaki Villar <[email protected]>

* using relativepath for javadoc.options.linksOffline

Signed-off-by: Inaki Villar <[email protected]>
(cherry picked from commit cc10b97)
Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]>

Co-authored-by: Iñaki Villar <[email protected]>
  • Loading branch information
opensearch-trigger-bot[bot] and cdsap authored Jul 21, 2022
1 parent 5b6c282 commit 6fe35d9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ allprojects {
task.reproducibleFileOrder = true
if (task instanceof SymbolicLinkPreservingTar) {
// Replace file timestamps with latest Git revision date (if available)
task.lastModifiedTimestamp = gitRevisionDate
task.lastModifiedTimestamp = gitRevisionDate
}
}

Expand Down Expand Up @@ -359,7 +359,8 @@ allprojects {
project.javadoc.dependsOn "${upstreamProject.path}:javadoc"
String externalLinkName = upstreamProject.archivesBaseName
String artifactPath = dep.group.replaceAll('\\.', '/') + '/' + externalLinkName.replaceAll('\\.', '/') + '/' + dep.version
project.javadoc.options.linksOffline artifactsHost + "/javadoc/" + artifactPath, "${upstreamProject.buildDir}/docs/javadoc/"
String projectRelativePath = project.relativePath(upstreamProject.buildDir)
project.javadoc.options.linksOffline artifactsHost + "/javadoc/" + artifactPath, "${projectRelativePath}/docs/javadoc/"
}
}
boolean hasShadow = project.plugins.hasPlugin(ShadowPlugin)
Expand Down
2 changes: 1 addition & 1 deletion distribution/packages/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ tasks.register('buildRpm', Rpm) {
}

tasks.register('buildNoJdkRpm', Rpm) {
configure(commonRpmConfig(true, 'x64'))
configure(commonRpmConfig(false, 'x64'))
}

Closure dpkgExists = { it -> new File('/bin/dpkg-deb').exists() || new File('/usr/bin/dpkg-deb').exists() || new File('/usr/local/bin/dpkg-deb').exists() }
Expand Down
6 changes: 4 additions & 2 deletions gradle/missing-javadoc.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ allprojects {
classpath = sourceSets.main.compileClasspath
srcDirSet = sourceSets.main.java

outputDir = project.javadoc.destinationDir
outputDir = file("${project.buildDir}/tmp/missingJavadoc/")
}
}
}
Expand Down Expand Up @@ -183,6 +183,7 @@ configure(project(":server")) {
}
}

@CacheableTask
class MissingJavadocTask extends DefaultTask {
@InputFiles
@SkipWhenEmpty
Expand Down Expand Up @@ -227,7 +228,8 @@ class MissingJavadocTask extends DefaultTask {
@Input
def executable

@Input
@InputFiles
@PathSensitive(PathSensitivity.RELATIVE)
def taskResources

/** Utility method to recursively collect all tasks with same name like this one that we depend on */
Expand Down

0 comments on commit 6fe35d9

Please sign in to comment.