Skip to content

Commit

Permalink
Migration to monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
siy committed Jan 6, 2021
1 parent 5f4eac1 commit 74a4323
Show file tree
Hide file tree
Showing 73 changed files with 570 additions and 4,279 deletions.
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# These are explicitly windows files and should use crlf
*.bat text eol=crlf

54 changes: 54 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# gradle stuff
build/
.gradle/

# eclipse stuff
bin/
.settings/
.project/
.classpath/
.project
.classpath

# intellij stuff
.idea/
*.iml
out/
emunie-json/out/
default.config
api.users

# other
.DS_Store
*.bak
*.log
*.orig
*.deb
*.tar
.env
*.swo
*.swp
# ignore jar files, but keep Gradle wrapper
*.jar
!gradle/wrapper/gradle-wrapper.jar

# radixdlt non-versioned files
RADIXDB/
RADIXDB_TEST/
logs/
default.config
logger.config
*.ks
*.key
*.wallet

# file generated by test
test.properties

# nod
node_modules/
package-lock.json

# auto-generated doc
**/resources/documentation/*.html
**/resources/markdown
37 changes: 37 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

language: java
sudo: false
install: true

addons:
sonarcloud:
organization: "radixdlt-github"
token:
secure: "h4HWuFvZ653b08LWGTEbRbD/PrMsWdx+kDQrrTxgEOVynKRyrksxAFN/91oxwlkjW2GFyktsd9fsegzCBLlayzpW5ZRZj/rYC8IYhDYUMTRXq1ssaTzLdzCNNN5zx5U5MHWfX7/HpSXjzqVlWs4Kd+/cJiMwNmTAnbIu3zFeLd+ILtoqVwRiuMJAyUYMMxufeBKJV1pykkvkwxgnNn0Y+YVcX/KZnZ8Qt1SsR6syu1S2j5Imc7Kcu0820I+He7xS4FNTv4hw+RiVQFn3SuNXVuwt6EQaRmXI7VLQEFntOpudsAHc3P/a+PExrjM4Dfgp4lAr/R4CdC1w5yML7VY0WWnX1jB/ibt2/d5yIRxHat6NHbrMNkiI15pKh5SWMhGYPRarFU73DD0lOSVTQgTNljvlvVH0DK4bEa2/VwDcjZ3l5npzVLUlvTuGkLxeVinu0UlXdawac3R2G6X/g4ZM4+tzTMvdNI5AkTt8aVoKm8lVdpCWB01AboaesQeoeRiGZJ1onszDW4ZTVA46gbF0GFC8XaiNCfIA94qgMbJxsu1z9a2cbVl24euQ9AdZXmRBa02xkukkKky2KtvI2dO2OZfqmfP/BKnCzVwc4gGu/BkaeI2tZsWqGLzRlNLtWAECNbzegDBwsijzd/iASluC2aFkzTELVftCoSNTiHppcWQ="

jdk:
- openjdk11

git:
depth: false

jobs:
include:
- stage: check
script: ./gradlew check jacocoTestReport sonarqube --info --refresh-dependencies
- stage: integration
script: ./gradlew integrationTest --refresh-dependencies

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/

cache:
directories:
- '$HOME/.m2/repository'
- '$HOME/.sonar/cache'
- '$HOME/.gradle'
- '.gradle'

env:
- TEST_DURATION=30s
File renamed without changes.
10 changes: 4 additions & 6 deletions radixdlt-java/CONTRIBUTING.md → CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ Please report unacceptable behavior to [hello@radixdlt.com](mailto:hello@radixdl

### Reporting a bug

* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/radixdlt/radixdlt-js/issues).
* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/radixdlt/radixdlt-js/issues/new). Be sure to include:
* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/radixdlt/radixdlt-parent/issues).
* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/radixdlt/radixdlt-parent/issues/new). Be sure to include:
* a **title**,
* a **clear description**,
* as much **relevant information** as possible,
Expand All @@ -54,8 +54,8 @@ Rebasing should be avoided. Rebases cause potential conflicts with other people'

### Branch types and naming

* Release candidate - `rc/1.0.0`
* Release - `release/1.0.0`
* Release candidate - `rc/1.0`
* Release - `release/1.0`
* Feature - `feature/cool-bananas`
* Hotfix - `hotfix/bananas-too-hot`

Expand Down Expand Up @@ -146,5 +146,3 @@ Braces follow the Kernighan and Ritchie (K&R) style for nonempty blocks and bloc
* Fork the codebase and make changes, following these guidelines.
* Submit a new GitHub pull request with the proposed patch for review.
* Ensure the **pull request** description clearly describes the problem and solution. Include the relevant issue number if applicable.


187 changes: 187 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
/*
* (C) Copyright 2020 Radix DLT Ltd
*
* Radix DLT Ltd licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the
* License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the License.
*/

plugins {
id 'io.spring.dependency-management' version '1.0.10.RELEASE'
id 'nebula.ospackage' version '8.4.1'
id 'com.github.johnrengelman.shadow' version '6.0.0'
id 'me.champeau.gradle.jmh' version '0.5.1'
id 'org.sonarqube' version '2.7.1'
id 'com.adarshr.test-logger' version '2.1.0'
id 'com.palantir.git-version' version '0.12.3'
id 'com.moowork.node' version '1.3.1'
id 'net.nemerosa.versioning' version '2.14.0'
}

def radixVersion() {
def details = versionDetails()

def version
if (details.isCleanTag) {
version = details.lastTag
} else {
version = details.branchName
if (version == null) {
version = "detached-head-${details.gitHash}"
} else {
// Prepend last tag so builddeb doesn't choke on non-numeric branch names
version = "${details.lastTag}-${version}"
version = version.replaceAll('/', '~')
}
version = "${version}-SNAPSHOT"
}
return version
}

group 'com.radixdlt'
version radixVersion()

subprojects {
repositories {
jcenter()
mavenCentral()
maven { url 'https://jitpack.io' }
}

group 'com.radixdlt'
version rootProject.version

gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.release = 11
options.compilerArgs << "-Xlint:all"

//TODO: uncomment once warnings will be cleared
//options.compilerArgs << "-Werror"

options.compilerArgs << "-Xlint:-processing" // Not really a useful warning
options.compilerArgs << "-Xlint:-serial" //TODO: fix code to remove these warnings
options.compilerArgs << "-Xlint:-deprecation" //TODO: fix code to remove these warnings
options.compilerArgs << "-Xlint:-unchecked" //TODO: fix code to remove these warnings
options.compilerArgs << "-Xlint:-rawtypes" //TODO: fix code to remove these warnings
}

tasks.named("checkstyleMain") {
configFile = rootProject.file('config/checkstyle/checkstyle.xml')
exclude "**/org/radix/**/*.java"
exclude "**/examples/**/*.java"
}

tasks.named("checkstyleTest") {
configFile = rootProject.file('config/checkstyle/checkstyle_test.xml')
exclude "**/org/radix/**/*.java"
exclude "**/examples/**/*.java"
}
}

apply plugin: 'io.spring.dependency-management'
apply plugin: 'jacoco'
apply plugin: 'checkstyle'
apply plugin: 'com.adarshr.test-logger'

dependencyManagement {
overriddenByDependencies = false

dependencies {
dependency 'io.reactivex.rxjava3:rxjava:3.0.0'
dependency 'com.sleepycat:je:18.3.12'

// LMAX Disruptor for async logging
dependency 'com.lmax:disruptor:3.4.2'

dependency 'commons-cli:commons-cli:1.4'
dependency 'org.xerial.snappy:snappy-java:1.1.7.3'
dependency 'io.netty:netty-all:4.1.51.Final'
dependency('com.google.inject:guice:4.2.3') {
exclude 'com.google.guava:guava'
}

dependency('com.google.inject.extensions:guice-grapher:4.2.3') {
exclude 'com.google.guava:guava'
}

dependency 'io.undertow:undertow-core:2.0.32.Final'
dependency 'io.undertow:undertow-servlet:2.0.32.Final'
dependency 'com.stijndewitt.undertow.cors:undertow-cors-filter:0.4.0'

dependency 'org.apache.logging.log4j:log4j-api:2.13.1'
dependency 'org.apache.logging.log4j:log4j-core:2.13.1'
dependency 'org.apache.logging.log4j:log4j-slf4j-impl:2.13.3'

dependency('org.reflections:reflections:0.9.11') {
exclude 'com.google.guava:guava'
}

dependency 'com.google.code.gson:gson:2.8.2'
dependency 'org.bouncycastle:bcprov-jdk15to18:1.65'
dependency 'org.bouncycastle:bcpkix-jdk15to18:1.65'

dependency 'org.json:json:20180813'

dependency 'com.github.radixdlt:jackson-databind:feature~strict-property-ordering-downgraded-version-SNAPSHOT'

dependency 'com.fasterxml.jackson.core:jackson-core:2.11.3'
dependency 'com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.11.3'
dependency('com.fasterxml.jackson.datatype:jackson-datatype-json-org:2.11.3') {
exclude 'org.json:json'
}
dependency('com.fasterxml.jackson.datatype:jackson-datatype-guava:2.11.3') {
exclude 'com.google.guava:guava'
}

dependency 'com.google.guava:guava:29.0-jre'

// need at least this commit (or later): https://github.com/bitcoinj/bitcoinj/commit/7629677103dbdd80f14c63b066ed27e1fad47014
// in order to work with BouncyCastle 1.64 or later
// see issue: https://github.com/bitcoinj/bitcoinj/issues/1951
dependency('com.github.bitcoinj:bitcoinj:7c31dcb') {
exclude 'com.google.guava:guava'
}

dependency 'org.awaitility:awaitility:4.0.3'
dependency 'org.objenesis:objenesis:3.1'
dependency 'org.javassist:javassist:3.27.0-GA'
dependency 'org.mockito:mockito-core:3.5.10'
dependency 'net.bytebuddy:byte-buddy:1.10.13'
dependency 'net.bytebuddy:byte-buddy-agent:1.10.13'
dependency 'org.powermock:powermock-module-junit4:2.0.7'
dependency 'org.powermock:powermock-api-mockito2:2.0.7'
dependency 'nl.jqno.equalsverifier:equalsverifier:3.4.2'
dependency 'org.hamcrest:hamcrest-library:1.3'
dependency 'org.assertj:assertj-core:3.11.1'
dependency 'junit:junit:4.13.1'

dependency('com.flipkart.zjsonpatch:zjsonpatch:0.4.5') {
exclude 'com.fasterxml.jackson.core:jackson-core'
exclude 'com.fasterxml.jackson.core:jackson-databind'
}

dependency 'org.reflections:reflections:0.9.11'
dependency 'org.openjdk.jmh:jmh-core:1.25'
dependency 'org.openjdk.jmh:jmh-generator-annprocess:1.25'

dependency 'com.squareup.okhttp3:okhttp:3.12.11'
dependency 'com.squareup.okhttp3:logging-interceptor:3.12.11'
dependency 'io.reactivex.rxjava2:rxjava:2.1.14'

dependency 'com.google.code.gson:gson:2.8.2'
dependency 'commons-cli:commons-cli:1.4'
dependency 'info.picocli:picocli:4.4.0'
dependency 'info.picocli:picocli-codegen:4.4.0'
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@
<property name="message" value="Line has trailing spaces."/>
</module>

<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<!-- TODO: set to 150 once issues are fixed -->
<module name="LineLength">
<property name="max" value="300"/>
<property name="ignorePattern" value="^*BQAA.*$"/>
</module>

<!-- Checks for Headers -->
<!-- See http://checkstyle.sf.net/config_header.html -->
<!-- <module name="Header"> -->
Expand Down Expand Up @@ -118,12 +126,6 @@
<property name="processJavadoc" value="false"/>
</module>

<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<module name="LineLength">
<property name="max" value="150"/>
<property name="ignorePattern" value="^*BQAA.*$"/>
</module>
<module name="MethodLength"/>
<!-- module name="ParameterNumber"/ -->

Expand Down Expand Up @@ -172,7 +174,8 @@
<!-- See http://checkstyle.sf.net/config_design.html -->
<!-- module name="DesignForExtension"/ -->
<!-- module name="FinalClass"/ -->
<module name="HideUtilityClassConstructor"/>
<!-- TODO: enable it once issues are fixed -->
<!-- module name="HideUtilityClassConstructor"/ -->
<module name="InterfaceIsType"/>
<module name="VisibilityModifier">
<property name="packageAllowed" value="true"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@
<property name="message" value="Line has trailing spaces."/>
</module>

<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<module name="LineLength">
<property name="max" value="300"/>
<property name="ignorePattern" value="^*BQAA.*$"/>
</module>

<!-- Checks for Headers -->
<!-- See http://checkstyle.sf.net/config_header.html -->
<!-- <module name="Header"> -->
Expand Down Expand Up @@ -122,12 +129,6 @@
<property name="processJavadoc" value="false"/>
</module>

<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<module name="LineLength">
<property name="max" value="150"/>
<property name="ignorePattern" value="^*BQAA.*$"/>
</module>
<module name="MethodLength"/>
<!-- module name="ParameterNumber"/ -->

Expand Down Expand Up @@ -176,7 +177,7 @@
<!-- See http://checkstyle.sf.net/config_design.html -->
<!-- module name="DesignForExtension"/ -->
<!-- module name="FinalClass"/ -->
<module name="HideUtilityClassConstructor"/>
<!-- module name="HideUtilityClassConstructor"/ -->
<module name="InterfaceIsType"/>
<module name="VisibilityModifier">
<property name="packageAllowed" value="true"/>
Expand Down
2 changes: 1 addition & 1 deletion radixdlt-core/gradle.properties → gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
File renamed without changes.
Loading

0 comments on commit 74a4323

Please sign in to comment.