-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
349 changed files
with
15,715 additions
and
7,249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,235 +1,35 @@ | ||
group 'com.softwareverde' | ||
version '2.2.0' | ||
|
||
apply plugin: 'java' | ||
apply plugin: 'java-library' | ||
|
||
sourceCompatibility = 1.8 | ||
|
||
sourceSets { | ||
main { | ||
java | ||
resources | ||
} | ||
server { | ||
java | ||
resources | ||
|
||
compileClasspath += sourceSets.main.output | ||
runtimeClasspath += sourceSets.main.output | ||
} | ||
test { | ||
java | ||
resources | ||
|
||
compileClasspath += sourceSets.server.output | ||
runtimeClasspath += sourceSets.server.output | ||
} | ||
plugins { | ||
id 'java' | ||
id 'java-library' | ||
id 'maven-publish' | ||
} | ||
|
||
configurations { | ||
serverImplementation.extendsFrom implementation | ||
serverRuntimeOnly.extendsFrom runtimeOnly | ||
|
||
testImplementation.extendsFrom serverImplementation | ||
} | ||
group = 'com.softwareverde' | ||
version = '2.4.0' | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { url "https://jitpack.io" } | ||
compileJava { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
|
||
dependencies { | ||
// implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
|
||
// SPV Library | ||
api group: 'com.github.softwareverde', name: 'java-util', version: 'v2.7.3' | ||
api group: 'com.github.softwareverde', name: 'java-concurrent', version: 'v1.0.1' | ||
api group: 'com.github.softwareverde', name: 'java-cryptography', version: 'v3.2.1' | ||
api group: 'com.github.softwareverde', name: 'json', version: 'v2.0.0' | ||
api group: 'com.github.softwareverde', name: 'java-db', version: 'v3.3.0' | ||
|
||
implementation group: 'com.github.softwareverde', name: 'java-logging', version: 'v2.3.0' | ||
|
||
// Bitcoin Core RPC compatibility | ||
api (group: 'com.github.softwareverde', name: 'java-http-client', version: 'v2.2.5', force: true) | ||
api group: 'com.github.softwareverde', name: 'http-servlet', version: 'v3.2.0' | ||
implementation group: 'org.zeromq', name: 'jeromq', version: '0.5.2' | ||
|
||
implementation group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.68' | ||
apply from: 'gradle/sources.gradle' | ||
apply from: 'gradle/dependencies.gradle' | ||
apply from: 'gradle/tasks.gradle' | ||
|
||
// Server | ||
serverImplementation group: 'com.github.softwareverde', name: 'java-db-mysql', version: 'v4.2.2' | ||
serverImplementation group: 'com.github.softwareverde', name: 'java-db-mysql-embedded', version: 'v3.0.3' | ||
serverImplementation group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '2.7.3' | ||
|
||
serverImplementation group: 'com.github.softwareverde', name: 'java-mariadb-osx', version: 'v10.5.9-p4' | ||
serverImplementation group: 'com.github.softwareverde', name: 'java-mariadb-linux', version: 'v10.5.9-p1' | ||
serverImplementation group: 'com.github.softwareverde', name: 'java-mariadb-windows', version: 'v10.5.9' | ||
serverImplementation group: 'org.apache.commons', name: 'commons-dbcp2', version: '2.8.0' | ||
|
||
serverImplementation group: 'org.jocl', name: 'jocl', version: '2.0.1' | ||
|
||
// Testing | ||
testImplementation group: 'junit', name: 'junit', version: '4.11' | ||
} | ||
|
||
// configurations.all { | ||
// resolutionStrategy { | ||
// failOnVersionConflict() | ||
// } | ||
// } | ||
|
||
task makeFatJar(type: Jar) { | ||
manifest { | ||
attributes 'Implementation-Title': 'Bitcoin Server', | ||
'Implementation-Version': archiveVersion, | ||
'Main-Class': 'com.softwareverde.bitcoin.server.main.Main' | ||
} | ||
|
||
archiveBaseName = project.name + '-server-all' | ||
|
||
from (configurations.serverCompileClasspath.collect { it.isDirectory() ? it : zipTree(it) }) { | ||
exclude 'META-INF/MANIFEST.MF' | ||
exclude 'META-INF/*.SF' | ||
exclude 'META-INF/*.DSA' | ||
exclude 'META-INF/*.RSA' | ||
} | ||
|
||
from sourceSets.main.output | ||
from sourceSets.server.output | ||
|
||
with jar | ||
} | ||
|
||
task makeLibJar(type: Jar) { | ||
manifest { | ||
attributes 'Implementation-Title': 'Bitcoin Verde Library', | ||
'Implementation-Version': archiveVersion | ||
} | ||
|
||
archiveBaseName = project.name + '-lib' | ||
|
||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE | ||
|
||
with jar | ||
artifacts { | ||
archives sourcesJar | ||
archives javadocJar | ||
} | ||
|
||
task makeJar(type: Jar) { | ||
manifest { | ||
attributes 'Implementation-Title': 'Bitcoin Server', | ||
'Implementation-Version': archiveVersion, | ||
'Main-Class': 'com.softwareverde.bitcoin.server.main.Main', | ||
'Class-Path': (project.configurations.serverCompileClasspath + configurations.serverRuntimeClasspath).collect { 'libs/' + it.getName() }.join(' ') | ||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
} | ||
} | ||
|
||
archiveBaseName = project.name + '-server' | ||
|
||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE | ||
|
||
from sourceSets.main.output | ||
from sourceSets.server.output | ||
|
||
with jar | ||
} | ||
|
||
task copyDependencies(type: Copy) { | ||
from (configurations.serverCompileClasspath + configurations.serverRuntimeClasspath) | ||
into "$buildDir/libs/libs" | ||
|
||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE | ||
} | ||
|
||
test { | ||
minHeapSize = "512m" | ||
maxHeapSize = "2024m" | ||
} | ||
|
||
tasks.withType(Test) { | ||
testLogging { | ||
// set options for log level LIFECYCLE | ||
events "passed", "skipped", "failed", "standardOut" | ||
showExceptions true | ||
exceptionFormat "full" | ||
showCauses true | ||
showStackTraces true | ||
showStandardStreams false | ||
|
||
// set options for log level DEBUG and INFO | ||
debug { | ||
events "started", "passed", "skipped", "failed", "standardOut", "standardError" | ||
exceptionFormat "full" | ||
} | ||
info.events = debug.events | ||
info.exceptionFormat = debug.exceptionFormat | ||
|
||
afterSuite { desc, result -> | ||
if (!desc.parent) { // will match the outermost suite | ||
def output = "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)" | ||
def startItem = '| ', endItem = ' |' | ||
def repeatLength = startItem.length() + output.length() + endItem.length() | ||
println('\n' + ('-' * repeatLength) + '\n' + startItem + output + endItem + '\n' + ('-' * repeatLength)) | ||
} | ||
} | ||
} | ||
} | ||
|
||
tasks.withType(Javadoc) { | ||
options.addStringOption('Xdoclint:none', '-quiet') | ||
} | ||
|
||
task sourcesJar(type: Jar, dependsOn: classes) { | ||
archiveClassifier = 'sources' | ||
from sourceSets.main.allSource | ||
} | ||
|
||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
archiveClassifier = 'javadoc' | ||
from javadoc.destinationDir | ||
} | ||
|
||
artifacts { | ||
archives sourcesJar | ||
archives javadocJar | ||
} | ||
|
||
allprojects { | ||
configurations { | ||
umljavadoc | ||
} | ||
|
||
dependencies { | ||
umljavadoc 'org.umlgraph:umlgraph:5.6' | ||
} | ||
|
||
// Requires "dot". `brew install graphviz` | ||
task makeDocumentation(dependsOn: javadoc) { | ||
setDescription('Generates Javadoc API documentation with UMLGraph diagrams') | ||
setGroup(JavaBasePlugin.DOCUMENTATION_GROUP) | ||
|
||
doLast { | ||
def javaFilePath = file('src/main/java') | ||
if (javaFilePath.exists()) { | ||
ant.javadoc(classpath: (configurations.serverCompileClasspath).asPath, | ||
sourcepath: file('src/main/java'), | ||
packagenames: '*', | ||
destdir: "${docsDir}/javadoc", | ||
private: 'true', | ||
docletpath: configurations.umljavadoc.asPath) { | ||
doclet(name: 'org.umlgraph.doclet.UmlGraphDoc') { | ||
param(name: '-inferrel') | ||
param(name: '-inferdep') | ||
param(name: '-qualify') | ||
param(name: '-postfixpackage') | ||
param(name: '-hide', value: 'java.*') | ||
param(name: '-collpackages', value: 'java.util.*') | ||
param(name: '-nodefontsize', value: '9') | ||
param(name: '-nodefontpackagesize', value: '7') | ||
param(name: '-link', value: 'http://java.sun.com/j2se/1.5.0/docs/guide/javadoc/doclet/spec') | ||
param(name: '-link', value: 'http://java.sun.com/j2se/1.5/docs/api') | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
repositories { | ||
mavenCentral() | ||
maven { url "https://jitpack.io" } | ||
} | ||
|
||
dependencies { | ||
// implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
|
||
// SPV Library | ||
api group: 'com.github.softwareverde', name: 'java-util', version: 'v2.7.5' | ||
api group: 'com.github.softwareverde', name: 'java-concurrent', version: 'v1.0.1' | ||
api group: 'com.github.softwareverde', name: 'java-cryptography', version: 'v3.2.1' | ||
api group: 'com.github.softwareverde', name: 'json', version: 'v2.0.1' | ||
api group: 'com.github.softwareverde', name: 'java-db', version: 'v3.3.0' | ||
|
||
implementation group: 'com.github.softwareverde', name: 'java-logging', version: 'v2.3.0' | ||
|
||
// Bitcoin Core RPC compatibility | ||
api (group: 'com.github.softwareverde', name: 'java-http-client') { version { strictly 'v2.2.5' } } | ||
api group: 'com.github.softwareverde', name: 'http-servlet', version: 'v3.3.0' | ||
implementation group: 'org.zeromq', name: 'jeromq', version: '0.5.2' | ||
|
||
implementation group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.70' | ||
|
||
// Server | ||
serverImplementation group: 'com.github.softwareverde', name: 'java-db-mysql', version: 'v4.2.2' | ||
serverImplementation group: 'com.github.softwareverde', name: 'java-db-mysql-embedded', version: 'v3.2.1' | ||
serverImplementation group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '3.0.7' | ||
|
||
serverImplementation group: 'com.github.softwareverde', name: 'java-mariadb-osx', version: 'v10.8.3' | ||
serverImplementation group: 'com.github.softwareverde', name: 'java-mariadb-linux', version: 'v10.8.3-p1' | ||
serverImplementation group: 'com.github.softwareverde', name: 'java-mariadb-windows', version: 'v10.5.9' | ||
|
||
// Used for routing MariaDbConnectionPool logs... | ||
serverImplementation group: 'com.github.softwareverde', name: 'java-logging-slf4j', version: 'v1.0.1' | ||
serverImplementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.36' | ||
|
||
serverImplementation group: 'org.jocl', name: 'jocl', version: '2.0.4' | ||
|
||
// Testing | ||
testImplementation group: 'junit', name: 'junit', version: '4.13.2' | ||
} | ||
|
||
// configurations.all { | ||
// resolutionStrategy { | ||
// failOnVersionConflict() | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
sourceSets { | ||
main { | ||
java | ||
resources | ||
} | ||
server { | ||
java | ||
resources | ||
|
||
compileClasspath += sourceSets.main.output | ||
runtimeClasspath += sourceSets.main.output | ||
} | ||
test { | ||
java | ||
resources | ||
|
||
compileClasspath += sourceSets.server.output | ||
runtimeClasspath += sourceSets.server.output | ||
} | ||
} | ||
|
||
configurations { | ||
serverImplementation.extendsFrom implementation | ||
serverRuntimeOnly.extendsFrom runtimeOnly | ||
|
||
testImplementation.extendsFrom serverImplementation | ||
} |
Oops, something went wrong.