/** * BStore-j - explicit-first Java storage access library. * * This module starts as a copy of bstore-java and evolves independently with a * separate artifact identity while preserving the established package surface. */ apply plugin: 'java' apply plugin: 'maven-publish' apply plugin: 'eclipse' apply from: 'extra.gradle' project.buildDir = 'target' group = 'com.reliancy' version = '1.0.0-SNAPSHOT' base { archivesName = 'bstore-j' } java { sourceCompatibility = JavaVersion.VERSION_21 targetCompatibility = JavaVersion.VERSION_21 } tasks.withType(JavaCompile) { options.compilerArgs << '-parameters' } dependencies { // Database drivers implementation 'com.h2database:h2:2.3.232' implementation 'org.postgresql:postgresql:42.7.4' implementation 'com.microsoft.sqlserver:mssql-jdbc:12.8.1.jre11' implementation 'com.zaxxer:HikariCP:5.1.0' // Testing testImplementation "junit:junit:4.13.2" testRuntimeOnly 'org.slf4j:slf4j-simple:2.0.16' } repositories { mavenCentral() maven { url "https://repo.reliancy.com/repository/maven-hub" } } publishing { publications { mavenJava(MavenPublication) { from components.java artifactId = 'bstore-j' artifact packageJavadoc artifact packageSources pom { name = 'BStore-j' description = 'Explicit-first Java storage access library preserving the established rec and dbo package surface' licenses { license { name = 'GNU Lesser General Public License, Version 3.0' url = 'https://www.gnu.org/licenses/lgpl-3.0.txt' } } } } } repositories { maven { def repoUrl = project.repo_url def isSnapshot = project.version.toUpperCase().endsWith("-SNAPSHOT") if (repoUrl.endsWith('/maven')) { url repoUrl + (isSnapshot ? '-snapshots' : '-releases') } else if (repoUrl.endsWith('-')) { if (isSnapshot) { url repoUrl + "snapshots" } else { url repoUrl + "releases" } } else { url repoUrl } credentials { username project.repo_user password project.repo_pwd } } } } javadoc { source = sourceSets.main.allJava classpath = configurations.compileClasspath failOnError = false options { setMemberLevel JavadocMemberLevel.PUBLIC setAuthor true addStringOption('Xdoclint:none', '-quiet') links "https://docs.oracle.com/javase/21/docs/api/" } } test { environment "DB_URL", project.db_url testLogging { outputs.upToDateWhen { false } exceptionFormat = 'full' events "passed", "skipped", "failed", "standardOut", "standardError" } } jar { archiveBaseName = 'bstore-j' archiveVersion = project.version manifest { attributes "Implementation-Title": "BStore-j", "Implementation-Version": project.version, "Implementation-Vendor": "Reliancy LLC" } } eclipse { classpath { defaultOutputDir = file("${relativePath(buildDir)}/bin") file.whenMerged { cp -> cp.entries.forEach { cpe -> if (cpe.kind == 'src' && cpe.hasProperty('output')) { cpe.output = cpe.output.replace('bin/', "${relativePath(buildDir)}/classes/java/") } } } } }