Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,22 @@ allprojects {

// Configure JUnit tests
tasks.withType(Test) {
reports.junitXml.destination = project.file("${->project.buildDir}/test-results")
reports.junitXml.outputLocation = project.file("${->project.buildDir}/test-results")
}

def projectName = it.name
def projectVersion = it.version

// Configure JAR generation
tasks.jar.configure {
description = "Produces a Jar with the main classes in .out/."
manifest {
attributes "Built-JDK": System.getProperty("java.version"),
"Specification-Title": project.name,
"Specification-Version": "${-> project.version}",
"Specification-Title": projectName,
"Specification-Version": "${-> projectVersion}",
"Specification-Vendor": "Apple Inc.",
"Implementation-Title": project.name,
"Implementation-Version": "${-> project.version}",
"Implementation-Title": projectName,
"Implementation-Version": "${-> projectVersion}",
"Implementation-Vendor": "Apple Inc."
}
doFirst {
Expand Down Expand Up @@ -182,8 +185,10 @@ allprojects {
subprojects {
apply from: rootProject.file('gradle/testing.gradle')

sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

def publishBuild = Boolean.parseBoolean(findProperty('publishBuild') ?: 'false')
def autoServiceVersion = publishBuild ? libs.versions.autoService.asProvider().get() : libs.versions.autoService.development.get()
Expand Down
6 changes: 4 additions & 2 deletions examples/examples.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,7 @@ dependencies {
runtimeOnly(libs.log4j.core) // library
}

mainClassName = 'com.apple.foundationdb.record.sample.Main'
applicationDefaultJvmArgs = ["-Dlog4j.configurationFile=${projectDir}/src/main/resources/log4j2.properties"]
application {
mainClass = 'com.apple.foundationdb.record.sample.Main'
applicationDefaultJvmArgs = ["-Dlog4j.configurationFile=${projectDir}/src/main/resources/log4j2.properties"]
}
7 changes: 5 additions & 2 deletions fdb-relational-api/fdb-relational-api.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,19 @@ task createVersionPropertiesFile() {
// Write a file of version and build info for the java processes to read
// from their classpaths.
def versionsFile = new File(projectDir, "src/gen/main/resources/version.properties")
def projectVersion = project.version
def rootProjectName = rootProject.name
def gitDetails = versionDetails()

outputs.file versionsFile
doLast {
println "Writing ${versionsFile}"
versionsFile.text = """# Generated by fdb-relational-api build.
# Returned by RelationalDatabaseMetaData#getDatabaseProductName()
name=${rootProject.name}
name=${rootProjectName}
# Returned by RelationalDatabaseMetaData#getDatabaseProductVersion()
# and by RelationalDatabaseMetaData#getDriverVersion()
version=${project.version}
version=${projectVersion}
gitHash=${gitDetails.gitHashFull}
branch=${gitDetails.branchName}
# Returned as RelationalDatabaseMetaData#getUrl()
Expand Down
2 changes: 1 addition & 1 deletion fdb-relational-cli/fdb-relational-cli.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ dependencies {
}

jar {
duplicatesStrategy "exclude"
duplicatesStrategy = "exclude"
manifest {
attributes(
'Main-Class': 'com.apple.foundationdb.relational.cli.sqlline.RelationalSQLLine',
Expand Down
2 changes: 1 addition & 1 deletion fdb-relational-jdbc/fdb-relational-jdbc.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ serviceLoader {
}

jar {
duplicatesStrategy "exclude"
duplicatesStrategy = "exclude"
}

// Task to build a fat jar, one w/ all dependencies; good for handing out as the 'jdbc' jar.
Expand Down
4 changes: 3 additions & 1 deletion fdb-relational-server/fdb-relational-server.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ jar {

// Task to build a fat jar, one w/ all dependencies
shadowJar {
mainClassName = mainServerClass
application {
mainClass = mainServerClass
}
mergeServiceFiles()
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/testing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ task destructiveTest(type: Test) {
maxParallelForks = 1
}
reports {
junitXml.destination = file("${buildDir}/test-results/destructive")
junitXml.outputLocation = file("${buildDir}/test-results/destructive")
}
}

Expand Down
2 changes: 1 addition & 1 deletion yaml-tests/yaml-tests.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ project.tasks.named("processTestResources") {
}

tasks.named("sourcesJar") {
duplicatesStrategy('include')
duplicatesStrategy = 'include'
// classifier('sources')
from sourceSets.main.allSource
}
Expand Down
Loading