group = 'org.tmatesoft.sqljet' version = '1.1.11' task wrapper(type: Wrapper) { gradleVersion = '2.14' } ext { release = false target = '1.5' versionMajor = '1' versionMinor = '1' versionMicro = '11' versionQualifier = !release ? 'SNAPSHOT' : '' if (!release) { rootProject.version = rootProject.version + '-SNAPSHOT' } buildNumber = project.hasProperty('revision') ? ('r' + project.revision) : null if (buildNumber == null) { if (release) { throw new GradleException('release or interim targets requires build number to be specified via revision project property (-Prevision=REV)') } def buildTime = new java.text.SimpleDateFormat("yyyyMMddHHmmss", java.util.Locale.US).format(new Date()) buildNumber = 't' + buildTime } println "Version: ${rootProject.version}" println "Build Number: ${rootProject.buildNumber}" buildVersion = rootProject.version } def javaProjects() { return subprojects.findAll { it.name != 'sqljet-distribution' } } def exampleProjects() { return javaProjects().findAll { it.name.startsWith('sqljet-example-') } } allprojects { apply plugin : 'base' apply plugin : 'maven' repositories { mavenCentral() maven { url 'https://maven.tmatesoft.com/content/repositories/releases' } maven { url 'https://maven.tmatesoft.com/content/repositories/snapshots' } } } subprojects { apply plugin : 'base' apply plugin : 'maven' apply plugin : 'signing' version = rootProject.version ext { release = rootProject.release target = rootProject.target buildVersion = [ baseVersion : '1.1.11', buildNumber : buildNumber, major: '1', minor: '1', micro: '11' ] buildNumber = rootProject.buildNumber } signing { required { project.hasProperty('signing.keyId') } sign configurations.archives } uploadArchives { dependsOn signArchives enabled = false repositories.mavenDeployer { beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } if (project.hasProperty('mavenReleasesRepository')) { repository( url : "${mavenReleasesRepository}") { if (project.hasProperty('mavenUser')) { authentication(userName: "${mavenUser}", password: "${mavenPassword}") } } } if (project.hasProperty('mavenSnapshotsRepository')) { snapshotRepository( url : "${mavenSnapshotsRepository}") { if (project.hasProperty('mavenUser')) { authentication(userName: "${mavenUser}", password: "${mavenPassword}") } } } } } } configure(javaProjects()) { apply plugin : 'java' sourceCompatibility = target targetCompatibility = target configurations { sources javadocs jar_archive } task sourcesJar(type: Jar) { description = 'Builds Java Sources Jar' from sourceSets.main.java.srcDirs classifier = 'sources' } jar { metaInf { from rootProject.file('LICENSE.txt') } } artifacts { sources sourcesJar } } configure(javaProjects() + rootProject) { apply plugin : 'idea' apply plugin : 'eclipse' } project(':sqljet') { dependencies { compile('org.antlr:antlr-runtime:3.4') { exclude group: 'org.antlr', module: 'ST4' exclude group: 'org.antlr', module: 'stringtemplate' exclude group: 'antlr', module: 'antlr' } testCompile 'junit:junit:4.8.2' testCompile 'org.easymock:easymock:2.4' testCompile 'org.xerial:sqlite-jdbc:3.7.2' } uploadArchives { enabled = true repositories.mavenDeployer { pom.artifactId = 'sqljet' pom.groupId = 'org.tmatesoft.sqljet' pom.project { name "SQLJet Java(tm) Sqlite Library" description "Java(tm) library to manage sqlite databases" url "https://sqljet.com/" scm { url "https://svn.tmatesoft.com/repos/sqljet" connection "scm:svn:https://svn.tmatesoft.com/repos/sqljet" developerConnection "scm:svn:https://svn.tmatesoft.com/repos/sqljet" } organization { name "TMate Software" url "https://sqljet.com/" } developers { developer { id "alexander.kitaev" email "support@sqljet.com" name "Alexander Kitaev" roles { role "developer" } } } licenses { license { name "GNU General Public License (GPL)" url "https://sqljet.com/" distribution "repos" comments "GPL license with a dual-licensing option for closed source usage" } } } } } } project(':sqljet-osgi') { sourcesJar.enabled=false artifacts { archives jar } uploadArchives { enabled = true repositories.mavenDeployer { pom.artifactId = 'sqljet-osgi' pom.groupId = 'org.tmatesoft.sqljet' pom.whenConfigured { p -> p.dependencies.clear() } pom.project { name "SQLJet Java(tm) Sqlite Library" description "Java(tm) library to manage sqlite databases" url "https://sqljet.com/" scm { url "https://svn.tmatesoft.com/repos/sqljet" connection "scm:svn:https://svn.tmatesoft.com/repos/sqljet" developerConnection "scm:svn:https://svn.tmatesoft.com/repos/sqljet" } organization { name "TMate Software" url "https://sqljet.com/" } developers { developer { id "alexander.kitaev" email "support@sqljet.com" name "Alexander Kitaev" roles { role "developer" } } } licenses { license { name "GNU General Public License (GPL)" url "https://sqljet.com/" distribution "repos" comments "GPL license with a dual-licensing option for closed source usage" } } } } } }