Skip to content

Commit

Permalink
Add license check plugins and prepare for release
Browse files Browse the repository at this point in the history
  • Loading branch information
vogti committed Jan 10, 2022
1 parent 114dded commit 57e81bb
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 17 deletions.
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ buildscript {
plugins {
id "org.jetbrains.kotlin.jvm" version "1.5.31"
id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.1"
id "com.github.johnrengelman.shadow" version "7.0.0"
}


Expand All @@ -43,13 +42,14 @@ allprojects {
compileTestJava.options.encoding = "UTF-8"
javadoc.options.encoding = "UTF-8"

sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = 1.11
targetCompatibility = 1.11

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}


repositories {
mavenLocal()
mavenCentral()
Expand Down Expand Up @@ -94,7 +94,7 @@ allprojects {
}
dockerTests.dependsOn(testClasses)

String storeName = System.getProperty("store.default") != null ? System.getProperty("store.default") : "hsqldb"
String storeName = System.getProperty("store.default") != null ? System.getProperty("store.default") : 'hsqldb'

task integrationTests(type: Test) {
description = 'Runs integration tests.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void addWebUiGroup( final WebUiGroup g ) {
@Override
public String toString() {

TypeAdapter<Enum<?>> enumTypeAdapter = new TypeAdapter<Enum<?>>() {
TypeAdapter<Enum<?>> enumTypeAdapter = new TypeAdapter<>() {
@Override
public void write( JsonWriter out, Enum value ) throws IOException {
out.beginObject();
Expand Down
127 changes: 116 additions & 11 deletions dbms/build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
import java.text.SimpleDateFormat

group "org.polypheny"


version = versionMajor + "." + versionMinor + versionQualifier


buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
google()
}
dependencies {
// Shadowing; used to make a fat jar (https://github.com/johnrengelman/shadow)
classpath group: "com.github.jengelman.gradle.plugins", name: "shadow", version: shadow_plugin_version
classpath group: "app.cash.licensee", name: "licensee-gradle-plugin", version: licensee_version
classpath group: "com.jaredsburrows", name: "gradle-license-plugin", version: license_report_version
}
}

plugins {
id "application"
id "com.github.johnrengelman.shadow" version "$shadow_plugin_version"
}

apply plugin: "com.github.johnrengelman.shadow"
apply plugin: "app.cash.licensee"
apply plugin: "com.jaredsburrows.license"

group "org.polypheny"

version = versionMajor + "." + versionMinor + versionQualifier


dependencies {
Expand Down Expand Up @@ -99,6 +108,83 @@ sourceSets {
}
}

licenseReport {
generateCsvReport = true
generateHtmlReport = true
generateJsonReport = true
}


licensee {
allow('Apache-2.0')
allow('MIT')
allow('BSD-2-Clause')
allow('BSD-3-Clause')
allow('CC0-1.0')
allowUrl('http://opensource.org/licenses/BSD-3-Clause')
allowUrl('http://www.wtfpl.net/')
allowUrl('https://creativecommons.org/publicdomain/zero/1.0/')
allowUrl('http://www.opensource.org/licenses/bsd-license.php') // BSD 2-Clause
allowUrl('https://www.eclipse.org/licenses/edl-v10.html') // EDL 1.0
allowUrl('http://www.eclipse.org/org/documents/edl-v10.php') // EDL 1.0

allowDependency('com.j256.simplemagic', 'simplemagic', '1.16') { because 'ISC license' }
allowDependency('com.adobe.xmp', 'xmpcore', '6.0.6') { because 'BSD 3-Clause' }
allowDependency('org.bouncycastle', 'bcpkix-jdk15on', '1.67') { because 'MIT license' }
allowDependency('org.bouncycastle', 'bcprov-jdk15on', '1.67') { because 'MIT license' }
allowDependency('org.vitrivr', 'cottontaildb', '0.13.0') { because 'MIT license' }
allowDependency('org.vitrivr', 'cottontaildb-proto', '0.13.0') { because 'MIT license' }
allowDependency('org.javassist', 'javassist', '3.28.0-GA') { because 'Apache 2.0 license' }
allowDependency('org.awaitility', 'awaitility', '4.0.1') { because 'Apache 2.0 license' }
allowDependency('net.java.dev.jna', 'jna', '5.9.0') { because 'Apache 2.0 license' }
allowDependency('net.java.dev.jna', 'jna-platform', '5.8.0') { because 'Apache 2.0 license' }
allowDependency('jakarta.xml.bind', 'jakarta.xml.bind-api', '2.3.2') { because 'Eclipse Distribution License 1.0' }
allowDependency('org.postgresql', 'postgresql', '42.2.19') { because 'BSD 2-Clause' }
allowDependency('org.ow2.asm', 'asm', '5.0.3') { because 'BSD 3-Clause' }
allowDependency('org.ow2.asm', 'asm-analysis', '5.0.3') { because 'BSD 3-Clause' }
allowDependency('org.ow2.asm', 'asm-commons', '5.0.3') { because 'BSD 3-Clause' }
allowDependency('org.ow2.asm', 'asm-tree', '5.0.3') { because 'BSD 3-Clause' }
allowDependency('org.ow2.asm', 'asm-util', '5.0.3') { because 'BSD 3-Clause' }
allowDependency('org.codehaus.janino', 'janino', '3.0.11') { because 'BSD 3-Clause' }
allowDependency('org.codehaus.janino', 'commons-compiler', '3.0.11') { because 'BSD 3-Clause' }
allowDependency('com.google.re2j', 're2j', '1.5') { because 'BSD 3-Clause' }
allowDependency('org.java-websocket', 'Java-WebSocket', '1.3.8') { because 'MIT license' }
allowDependency('org.hsqldb', 'hsqldb', '2.6.1') { because 'BSD 3-Clause' }


// Category B
allow('EPL-1.0')
allow('MPL-1.1')
allow('MPL-2.0')
allowUrl('http://www.eclipse.org/legal/epl-2.0') // EPL 2.0
allowUrl('https://www.eclipse.org/legal/epl-2.0/') // EPL 2.0
allowUrl('https://www.eclipse.org/org/documents/epl-v10.php') // EPL 1.0
allowUrl('https://www.eclipse.org/legal/epl-v20.html') // EPL 2.0
allowUrl('https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt') // EPL 2.0

allowDependency('jakarta.annotation', 'jakarta.annotation-api', '1.3.5') { because 'Eclipse Public License v. 2.0' }
allowDependency('jakarta.ws.rs', 'jakarta.ws.rs-api', '2.1.6') { because 'Eclipse Public License v. 2.0' }
allowDependency('com.github.jnr', 'jnr-posix', '3.0.47') { because 'Eclipse Public License v. 2.0' }
allowDependency('jakarta.activation', 'jakarta.activation-api', '1.2.1') { because 'Eclipse Public License v. 2.0' }
allowDependency('javax.annotation', 'javax.annotation-api', '1.3.2') { because 'CDDL license' }
allowDependency('javax.servlet', 'javax.servlet-api', '4.0.1') {
because 'Servlet-api.jar and javax.servlet-*.jar are under the CDDL license, the original source code for this can be found at http://www.eclipse.org/jetty/downloads.php'
}

// Glassfish
allowDependency('org.glassfish.jersey.core', 'jersey-common', '2.30.1') { because 'Eclipse Public License v. 2.0' }
allowDependency('org.glassfish.jersey.core', 'jersey-client', '2.30.1') { because 'Eclipse Public License v. 2.0' }
allowDependency('org.glassfish.jersey.inject', 'jersey-hk2', '2.30.1') { because 'Eclipse Public License v. 2.0' }
allowDependency('org.glassfish.jersey.connectors', 'jersey-apache-connector', '2.30.1') { because 'Eclipse Public License v. 2.0' }
allowDependency('org.glassfish.hk2.external', 'jakarta.inject', '2.6.1') { because 'Eclipse Public License v. 2.0' }
allowDependency('org.glassfish.hk2.external', 'aopalliance-repackaged', '2.6.1') { because 'Eclipse Public License v. 2.0' }
allowDependency('org.glassfish.hk2', 'osgi-resource-locator', '1.0.3') { because 'Eclipse Public License v. 2.0' }
allowDependency('org.glassfish.hk2', 'hk2-api', '2.6.1') { because 'Eclipse Public License v. 2.0' }
allowDependency('org.glassfish.hk2', 'hk2-locator', '2.6.1') { because 'Eclipse Public License v. 2.0' }
allowDependency('org.glassfish.hk2', 'hk2-utils', '2.6.1') { because 'Eclipse Public License v. 2.0' }

}


/**
* JARs
Expand All @@ -112,6 +198,12 @@ jar {
attributes "Build-Date": "${buildTime()}"
attributes "Main-Class": "org.polypheny.db.PolyphenyDb"
}
metaInf {
from(rootProject.rootDir, {
include "LICENSE"
include "NOTICE"
})
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier "sources"
Expand All @@ -133,8 +225,21 @@ assemble.dependsOn shadowJar
artifacts {
//archives jar // regular jar containing only the compiled source
archives shadowJar // fat jar which additionally contains all dependencies
archives sourcesJar // jar file containing the java doc files
archives javadocJar // jar file containing the source files
//archives sourcesJar // jar file containing the java doc files
//archives javadocJar // jar file containing the source files
}


/**
* Release
*/
application {
mainClassName = 'org.polypheny.db.PolyphenyDb'
applicationName = 'Polypheny-DB'
//applicationDefaultJvmArgs = ["-Dlog4j.configuration=config/log4j.properties"]
}
startScripts {
defaultJvmOpts += ['-Xmx6g', '-XX:+HeapDumpOnOutOfMemoryError', '-Dfile.encoding=UTF-8']
}

static def buildTime() {
Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ jsoup_version = 1.11.3
jsr305_version = 3.0.1
junit_version = 4.12
lang_painless_version = 6.2.4
licensee_version = 1.3.1
license_report_version = 0.8.90
log4j_api_version = 2.17.0
log4j_core_version = 2.17.0
log4j_slf4j_impl_version = 2.17.0
Expand All @@ -89,7 +91,7 @@ postgresql_version = 42.2.19
quidem_version = 0.9
reflections_version = 0.10.2
scott_data_hsqldb_version = 0.1
shadow_plugin_version = 6.1.0
shadow_plugin_version = 7.1.1
simplemagic_version = 1.16
sketches_core_version = 0.9.0
slf4j_api_version = 1.7.32
Expand Down

0 comments on commit 57e81bb

Please sign in to comment.