Skip to content

Commit

Permalink
more formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cdsap committed Aug 7, 2024
1 parent 3933850 commit 3cf616f
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public abstract class AbstractQuarkusExtension {
private static final String MANIFEST_SECTIONS_PROPERTY_PREFIX = "quarkus.package.jar.manifest.sections";
private static final String MANIFEST_ATTRIBUTES_PROPERTY_PREFIX = "quarkus.package.jar.manifest.attributes";

public static final String QUARKUS_PROFILE = "quarkus.profile";
protected static final String QUARKUS_PROFILE = "quarkus.profile";
protected final Project project;
protected final File projectDir;
protected final Property<String> finalName;
Expand Down Expand Up @@ -96,12 +96,12 @@ private BaseConfig buildBaseConfig() {
return new BaseConfig(effectiveConfig);
}

public BaseConfig baseConfig() {
protected BaseConfig baseConfig() {
this.baseConfig.finalizeValue();
return this.baseConfig.get();
}

public MapProperty<String, String> forcedPropertiesProperty() {
protected MapProperty<String, String> forcedPropertiesProperty() {
return forcedPropertiesProperty;
}

Expand Down Expand Up @@ -249,14 +249,14 @@ private void exportCustomManifestProperties(Map<String, Object> properties) {
}
}

public static String toManifestAttributeKey(String key) {
protected static String toManifestAttributeKey(String key) {
if (key.contains("\"")) {
throw new GradleException("Manifest entry name " + key + " is invalid. \" characters are not allowed.");
}
return String.format("%s.\"%s\"", MANIFEST_ATTRIBUTES_PROPERTY_PREFIX, key);
}

public static String toManifestSectionAttributeKey(String section, String key) {
protected static String toManifestSectionAttributeKey(String section, String key) {
if (section.contains("\"")) {
throw new GradleException("Manifest section name " + section + " is invalid. \" characters are not allowed.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,6 @@ private void readConfigurationFor(AbstractCompile task) {
}

private void readConfigurationFor(Test task) {
// if (task.getEnabled() && !task.getSource().isEmpty()) {
// File destDir = task.getDestinationDirectory().getAsFile().get();
// task.getSource().visit(fileVisitDetails -> {
// if (fileVisitDetails.getRelativePath().getParent().toString().isEmpty()) {
// File srcDir = fileVisitDetails.getFile().getParentFile();
// builder.tasks.put(task.getName(), new QuarkusTaskDescriptor(task.getName(), COMPILE, srcDir, destDir));
// SourceSetContainer sourceSets = task.getProject().getExtensions().getByType(SourceSetContainer.class);
// sourceSets.stream().filter(sourceSet -> sourceSet.getOutput().getClassesDirs().contains(destDir))
// .forEach(sourceSet -> builder.sourceSetTasks
// .computeIfAbsent(sourceSet.getName(), s -> ConcurrentHashMap.newKeySet())
// .add(task.getName()));
// fileVisitDetails.stopVisiting();
// }
// });
// }
}

private void readConfigurationFor(ProcessResources task) {
Expand Down Expand Up @@ -139,7 +124,6 @@ private void withKotlinJvmCompileType(Project project) {
}

private void readConfigurationFor(KotlinJvmCompile task) {
// TODO add task to sourceSetTasks
if (task.getEnabled() && !task.getSources().isEmpty()) {
File destDir = task.getDestinationDirectory().getAsFile().get();
AtomicReference<File> srcDir = new AtomicReference<>();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
plugins {
java
id("io.quarkus")
}

buildscript {
repositories {
mavenLocal()
mavenCentral()
}
}

repositories {
mavenLocal()
mavenCentral()
}

dependencies {
implementation(enforcedPlatform("io.quarkus:quarkus-bom:${project.property("version")}"))
implementation("jakarta.inject:jakarta.inject-api:2.0.1")
}

quarkus {
quarkusBuildProperties.put("quarkus.foo", "bar")
manifest {
attributes(mapOf("Manifest-Attribute" to "some-value"))
}

// The following line is replaced by the tests in `CachingTest`
// ADDITIONAL_CONFIG
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = "configuration-cache"

0 comments on commit 3cf616f

Please sign in to comment.