Skip to content

Commit

Permalink
revert sourceSet back to Java 11 and add getCompileClasspath() to res…
Browse files Browse the repository at this point in the history
…tModelCodegenClasspath
  • Loading branch information
Yan Zhou committed Sep 6, 2023
1 parent 1b70e14 commit 18655b4
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 2,132 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ and what APIs have changed, if applicable.

## [Unreleased]

## [29.46.0] - 2023-08-25
## [29.46.0] - 2023-09-05
- Rewrite the Java Doc logic in Java 11 APIs and use multi-release jar to be backward compatible with Java 8 consumers

## [29.45.0] - 2023-08-25
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ subprojects {
// so they don't conflict with "velocity-engine-core" module used
// for versions >=2.0
all*.exclude group: 'org.apache.velocity', module: 'velocity'
all*.exclude group: 'org.projectlombok', module: 'lombok'
}

if (!(it.name in ['data-avro', 'restli-int-test'])) {
Expand Down
4 changes: 2 additions & 2 deletions build_script/restModel.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ project.sourceSets.all { SourceSet sourceSet ->
project.tasks[sourceSet.compileJavaTaskName].dependsOn(rootProject.ext.build.restModelGenerateTasks[sourceSet])
}

// Use 'jar' instead a custom task name for Java 17 source set in the multi-release jar
final Task jarTask = project.tasks[sourceSet.getName().endsWith('17') ? 'jar' : sourceSet.getTaskName('', 'jar')]
// Use 'jar' instead a custom task name for Java 11 source set in the multi-release jar
final Task jarTask = project.tasks[sourceSet.getName().endsWith('11') ? 'jar' : sourceSet.getTaskName('', 'jar')]
jarTask.from(inputParentDirPath) {
include "${pegasusDirName}${File.separatorChar}**${File.separatorChar}*.pdsc"
include "${pegasusDirName}${File.separatorChar}**${File.separatorChar}*.pdl"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@ protected void configureRestModelGeneration(Project project, SourceSet sourceSet
// generate the rest model
FileCollection restModelCodegenClasspath = project.getConfigurations().getByName(PEGASUS_PLUGIN_CONFIGURATION)
.plus(project.getConfigurations().getByName(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME))
.plus(sourceSet.getRuntimeClasspath());
.plus(sourceSet.getRuntimeClasspath()).plus(sourceSet.getCompileClasspath());
String destinationDirPrefix = getGeneratedDirPath(project, sourceSet, REST_GEN_TYPE) + File.separatorChar;
FileCollection restModelResolverPath = apiProject.files(getDataSchemaPath(project, sourceSet))
.plus(getDataModelConfig(apiProject, sourceSet));
Expand Down

This file was deleted.

Loading

0 comments on commit 18655b4

Please sign in to comment.