-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add formatting logic * check formatting in ci * apply formatting * separate step for formatting * remove grEclipse: has troubles with arm64-linux
- Loading branch information
1 parent
55b1cca
commit e27b8b4
Showing
9 changed files
with
594 additions
and
493 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
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 |
---|---|---|
|
@@ -10,10 +10,35 @@ plugins { | |
group = 'io.github.crate-crypto' | ||
version = '0.0.3' | ||
|
||
spotless { | ||
java { | ||
// Apply Google's Java formatting style | ||
googleJavaFormat() | ||
|
||
// Remove unused imports | ||
importOrder() | ||
removeUnusedImports() | ||
|
||
// Enforce Unix line endings | ||
endWithNewline() | ||
indentWithSpaces(4) | ||
trimTrailingWhitespace() | ||
} | ||
|
||
// Use a simpler formatter for Gradle files | ||
groovy { | ||
target '*.gradle' | ||
// Basic formatting rules instead of Eclipse formatter | ||
// which seems to have issues on arm64-linux | ||
indentWithSpaces(4) | ||
trimTrailingWhitespace() | ||
endWithNewline() | ||
} | ||
} | ||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
repositories { | ||
|
@@ -30,17 +55,14 @@ if (hasProperty('buildScan')) { | |
dependencies { | ||
testImplementation platform('org.junit:junit-bom:5.10.0') | ||
testImplementation 'org.junit.jupiter:junit-jupiter' | ||
|
||
implementation 'net.java.dev.jna:jna:5.12.1' | ||
testImplementation 'io.tmio:tuweni-bytes:2.4.2' | ||
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.7.2' | ||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.2' | ||
testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.12.5' | ||
testImplementation 'org.assertj:assertj-core:3.22.0' | ||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.2' | ||
|
||
def jacksonVersion = "2.14.2" | ||
|
||
testFixturesImplementation("org.apache.tuweni:tuweni-units:2.3.1") | ||
testFixturesImplementation("com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}") | ||
testFixturesImplementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${jacksonVersion}") | ||
|
@@ -51,79 +73,75 @@ test { | |
dependsOn cleanTest | ||
testLogging.showStandardStreams = true | ||
} | ||
|
||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
from components.java | ||
|
||
pom { | ||
name = 'Verkle Cryptography Library' | ||
description = 'A library for working with Cryptography used in verkle trie' | ||
url = 'https://github.com/crate-crypto/rust-verkle' | ||
licenses { | ||
license { | ||
name = 'The Apache License, Version 2.0' | ||
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'kevthedev' | ||
name = 'Kevaundray Wedderburn' | ||
email = '[email protected]' | ||
} | ||
} | ||
scm { | ||
connection = 'scm:git:git://github.com/crate-crypto/rust-verkle.git' | ||
developerConnection = 'scm:git:ssh://github.com:crate-crypto/rust-verkle.git' | ||
url = 'https://github.com/crate-crypto/rust-verkle' | ||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
from components.java | ||
pom { | ||
name = 'Verkle Cryptography Library' | ||
description = 'A library for working with Cryptography used in verkle trie' | ||
url = 'https://github.com/crate-crypto/rust-verkle' | ||
licenses { | ||
license { | ||
name = 'The Apache License, Version 2.0' | ||
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'kevthedev' | ||
name = 'Kevaundray Wedderburn' | ||
email = '[email protected]' | ||
} | ||
} | ||
scm { | ||
connection = 'scm:git:git://github.com/crate-crypto/rust-verkle.git' | ||
developerConnection = 'scm:git:ssh://github.com:crate-crypto/rust-verkle.git' | ||
url = 'https://github.com/crate-crypto/rust-verkle' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
url = layout.buildDirectory.dir('staging-deploy') | ||
repositories { | ||
maven { | ||
url = layout.buildDirectory.dir('staging-deploy') | ||
} | ||
} | ||
} | ||
} | ||
|
||
jreleaser { | ||
// Jreleaser will look for .git and its at the top level repository | ||
gitRootSearch = true | ||
release { | ||
// Skip releases as this is handled by release-please | ||
github { | ||
skipRelease = true | ||
gitRootSearch = true | ||
release { | ||
github { | ||
skipRelease = true | ||
} | ||
} | ||
signing { | ||
active = 'ALWAYS' | ||
armored = true | ||
} | ||
} | ||
signing { | ||
active = 'ALWAYS' | ||
armored = true | ||
} | ||
deploy { | ||
maven { | ||
mavenCentral { | ||
sonatype { | ||
active = 'ALWAYS' | ||
url = 'https://central.sonatype.com/api/v1/publisher' | ||
stagingRepository('build/staging-deploy') | ||
deploy { | ||
maven { | ||
mavenCentral { | ||
sonatype { | ||
active = 'ALWAYS' | ||
url = 'https://central.sonatype.com/api/v1/publisher' | ||
stagingRepository('build/staging-deploy') | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
// JReleaser does not create this directory, so we manually create it | ||
// JReleaser does not create this directory, so we manually create it | ||
// ourselves. | ||
tasks.register('createJReleaserOutputDir') { | ||
doLast { | ||
mkdir 'build/jreleaser' | ||
} | ||
doLast { | ||
mkdir 'build/jreleaser' | ||
} | ||
} | ||
|
||
tasks.named('jreleaserFullRelease') { | ||
dependsOn 'createJReleaserOutputDir' | ||
} | ||
dependsOn 'createJReleaserOutputDir' | ||
} |
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,2 +1 @@ | ||
rootProject.name = 'java-verkle-cryptography' | ||
|
Oops, something went wrong.