diff --git a/gradle/project-info.gradle b/gradle/project-info.gradle index b04304f..637b9d0 100644 --- a/gradle/project-info.gradle +++ b/gradle/project-info.gradle @@ -1,25 +1,25 @@ -// ----------------------------------------------------------------------------- -// publishing information -// ----------------------------------------------------------------------------- -ext.publishing.artifactId = project.name.toLowerCase() -ext.publishing.groupId = 'eu.mihosoft.jcapture' -ext.publishing.versionId = '0.1.2' - -ext.publishing.developerName = 'Michael Hoffer' -ext.publishing.developerAlias = 'miho' -ext.publishing.developerEmail = 'info@michaelhoffer.de' -ext.publishing.inceptionYear = '2017' - -ext.publishing.bintray.repo = 'JCapture' -ext.publishing.bintray.userOrg = 'miho' -ext.publishing.bintray.name = project.name - -ext.publishing.desc = 'Simple API for capturing video devices' -ext.publishing.license = 'Apache-2.0' -ext.publishing.licenseUrl = 'https://github.com/miho/JCapture/blob/master/LICENSE.txt' -ext.publishing.labels = ['video', 'webcam', 'capture'] -ext.publishing.websiteUrl = 'https://github.com/miho/JCapture' -ext.publishing.issueTrackerUrl = 'https://github.com/miho/JCapture/issues' -ext.publishing.vcsUrl = 'https://github.com/miho/JCapture.git' - -ext.publishing.pomName = ext.publishing.artifactId +// ----------------------------------------------------------------------------- +// publishing information +// ----------------------------------------------------------------------------- +ext.publishing.artifactId = project.name.toLowerCase() +ext.publishing.groupId = 'eu.mihosoft.freerouting' +ext.publishing.versionId = '1.3.0' + +ext.publishing.developerName = 'Michael Hoffer' +ext.publishing.developerAlias = 'miho' +ext.publishing.developerEmail = 'info@michaelhoffer.de' +ext.publishing.inceptionYear = '2017' + +ext.publishing.bintray.repo = 'Freerouting' +ext.publishing.bintray.userOrg = 'miho' +ext.publishing.bintray.name = project.name + +ext.publishing.desc = 'Advanced PCB Autorouter' +ext.publishing.license = 'GPL-3.0' +ext.publishing.licenseUrl = 'https://github.com/miho/freerouting/blob/master/LICENSE.txt' +ext.publishing.labels = ['PCB', 'Autorouter', 'KiCad', 'EAGLE'] +ext.publishing.websiteUrl = 'https://github.com/miho/freerouting' +ext.publishing.issueTrackerUrl = 'https://github.com/miho/freerouting/issues' +ext.publishing.vcsUrl = 'https://github.com/miho/freerouting.git' + +ext.publishing.pomName = ext.publishing.artifactId diff --git a/gradle/publishing.gradle b/gradle/publishing.gradle index 4d8d648..a137826 100644 --- a/gradle/publishing.gradle +++ b/gradle/publishing.gradle @@ -1,122 +1,124 @@ -// ----------------------------------------------------------------------------- -// Collect publishing information -// ----------------------------------------------------------------------------- -ext.publishing = [:] -ext.publishing.bintray = [:] - -ext.publishing.pomName = ext.publishing.artifactId - -apply from: "gradle/project-info.gradle" - -// ----------------------------------------------------------------------------- -// Performs publishing -// ----------------------------------------------------------------------------- - -task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' - from javadoc.destinationDir -} - -// create one jar for the source files -task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' - from sourceSets.main.allSource -} - -artifacts { - archives jar - archives javadocJar - archives sourcesJar -} -Date buildTimeAndDate = new Date() -ext { - buildDate = new java.text.SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate) - buildTime = new java.text.SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate) -} - -jar { - manifest { - attributes( - 'Built-By': System.properties['user.name'], - 'Created-By': System.properties['java.version'] + " (" + System.properties['java.vendor'] + " " + System.properties['java.vm.version'] + ")", - 'Build-Date': project.buildDate, - 'Build-Time': project.buildTime, - 'Build-Revision': versioning.info.commit, - 'Specification-Title': project.name, - 'Specification-Version': project.version, - 'Implementation-Title': project.name, - 'Implementation-Version': project.version - ) - } -} - - -def pomConfig = { - name ext.publishing.pomName - description ext.publishing.desc - url ext.publishing.websiteUrl - inceptionYear ext.publishing.inceptionYear - licenses { - license([:]) { - name ext.publishing.license - url ext.publishing.licenseUrl - distribution 'repo' - } - } - scm { - url ext.publishing.vcsUrl - connection ext.publishing.vcsUrl - developerConnection ext.publishing.vcsUrl - } - developers { - developer { - id ext.publishing.developerNameAlias - name ext.publishing.developerName - } - } -} - -publishing { - publications { - mavenCustom(MavenPublication) { - groupId publishing.groupId - artifactId publishing.artifactId - version publishing.versionId - from components.java - artifact sourcesJar - artifact javadocJar - - pom.withXml { - def root = asNode() - root.appendNode 'description', publishing.desc - root.children().last() + pomConfig - } - } - } -} - -if (!project.hasProperty('bintrayUsername')) ext.bintrayUsername = '' -if (!project.hasProperty('bintrayApiKey')) ext.bintrayApiKey = '' - -bintray { - user = project.bintrayUsername - key = project.bintrayApiKey - publications = ['mavenCustom'] - pkg { - repo = publishing.bintray.repo - userOrg = publishing.bintray.userOrg - name = publishing.bintray.name - desc = publishing.desc - licenses = [publishing.license] - labels = publishing.labels - websiteUrl = publishing.websiteUrl - issueTrackerUrl = publishing.issueTrackerUrl - vcsUrl = publishing.vcsUrl - publicDownloadNumbers = true - - version { - name = publishing.versionId - vcsTag = 'v' + publishing.versionId - } - } +// ----------------------------------------------------------------------------- +// Collect publishing information +// ----------------------------------------------------------------------------- +ext.publishing = [:] +ext.publishing.bintray = [:] + +ext.publishing.pomName = ext.publishing.artifactId + +apply from: "gradle/project-info.gradle" + +// ----------------------------------------------------------------------------- +// Performs publishing +// ----------------------------------------------------------------------------- + +task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir +} + +// create one jar for the source files +task sourcesJar(type: Jar, dependsOn: classes) { + classifier = 'sources' + from sourceSets.main.allSource +} + +artifacts { + archives jar + archives javadocJar + archives sourcesJar +} + +Date buildTimeAndDate = new Date() +ext { + buildDate = new java.text.SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate) + buildTime = new java.text.SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate) +} + +jar { + manifest { + attributes( + 'Built-By': System.properties['user.name'], + 'Created-By': System.properties['java.version'] + " (" + System.properties['java.vendor'] + " " + System.properties['java.vm.version'] + ")", + 'Build-Date': project.buildDate, + 'Build-Time': project.buildTime, + 'Build-Revision': versioning.info.commit, + 'Specification-Title': project.name, + 'Specification-Version': project.version, + 'Implementation-Title': project.name, + 'Implementation-Version': project.version + ) + } +} + + +def pomConfig = { + name ext.publishing.pomName + description ext.publishing.desc + url ext.publishing.websiteUrl + inceptionYear ext.publishing.inceptionYear + licenses { + license([:]) { + name ext.publishing.license + url ext.publishing.licenseUrl + distribution 'repo' + } + } + scm { + url ext.publishing.vcsUrl + connection ext.publishing.vcsUrl + developerConnection ext.publishing.vcsUrl + } + developers { + developer { + id ext.publishing.developerNameAlias + name ext.publishing.developerName + } + } +} + +publishing { + publications { + mavenCustom(MavenPublication) { + groupId publishing.groupId + artifactId publishing.artifactId + version publishing.versionId + from components.java + artifact sourcesJar + artifact javadocJar + artifact executableJar + + pom.withXml { + def root = asNode() + root.appendNode 'description', publishing.desc + root.children().last() + pomConfig + } + } + } +} + +if (!project.hasProperty('bintrayUsername')) ext.bintrayUsername = '' +if (!project.hasProperty('bintrayApiKey')) ext.bintrayApiKey = '' + +bintray { + user = project.bintrayUsername + key = project.bintrayApiKey + publications = ['mavenCustom'] + pkg { + repo = publishing.bintray.repo + userOrg = publishing.bintray.userOrg + name = publishing.bintray.name + desc = publishing.desc + licenses = [publishing.license] + labels = publishing.labels + websiteUrl = publishing.websiteUrl + issueTrackerUrl = publishing.issueTrackerUrl + vcsUrl = publishing.vcsUrl + publicDownloadNumbers = true + + version { + name = publishing.versionId + vcsTag = 'v' + publishing.versionId + } + } } \ No newline at end of file