Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLS-30 #5

Merged
merged 4 commits into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 67 additions & 33 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,54 +1,88 @@
plugins {
id 'java'
id 'org.graalvm.buildtools.native' version '0.9.20'
id 'java'
id 'org.graalvm.buildtools.native' version '0.9.20'
id("com.diffplug.spotless") version "6.17.0"
id("nebula.lint") version "18.0.3"
}

repositories {
mavenCentral()
gradlePluginPortal()
mavenCentral()
gradlePluginPortal()
}

allprojects {
version = "1.0.0-SNAPSHOT"
group = 'it.pagopa'
version = "1.0.0-SNAPSHOT"
group = 'it.pagopa'
apply plugin: 'com.diffplug.spotless'
apply plugin: 'nebula.lint'
gradleLint.rules = ['all-dependency']
}

tasks.withType(AbstractArchiveTask).configureEach {
preserveFileTimestamps = false
reproducibleFileOrder = true
preserveFileTimestamps = false
reproducibleFileOrder = true
}

subprojects {
tasks.withType(JavaCompile) {
options.compilerArgs.add('-Xlint:all')
}

apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'org.graalvm.buildtools.native'
spotless {
// optional: limit format enforcement to just the files changed by this feature branch
ratchetFrom 'origin/main'

java {
withSourcesJar()
withJavadocJar()
}
format 'misc', {
// define the files to apply `misc` to
target '*.gradle', '*.md', '.gitignore'

publishing {
publications {
maven(MavenPublication) {
groupId project.group
artifactId project.name
version project.version
from components.java
}
}
}
// define the steps to apply to those files
trimTrailingWhitespace()
indentWithTabs() // or spaces. Takes an integer argument if you don't like 4
endWithNewline()
}
java {
// don't need to set target, it is inferred from java

// apply a specific flavor of google-java-format
googleJavaFormat('1.11.0').aosp().reflowLongStrings()
// fix formatting of type annotations
formatAnnotations()
// make sure every file has the following copyright header.
// optionally, Spotless can set copyright years by digging
// through git history (see "license" section below)
licenseHeader '/* (C)$YEAR */'
}
}

graalvmNative {
binaries {
main {
sharedLibrary=true
}
}
}
subprojects {

apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'org.graalvm.buildtools.native'


java {
withSourcesJar()
withJavadocJar()
}

publishing {
publications {
maven(MavenPublication) {
groupId project.group
artifactId project.name
version project.version
from components.java
}
}
}

}

graalvmNative {
binaries {
main {
sharedLibrary=true
}
}
}
10 changes: 5 additions & 5 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
*/

pluginManagement {
repositories {
mavenCentral()
gradlePluginPortal()
}
repositories {
mavenCentral()
gradlePluginPortal()
}
}

rootProject.name = 'eng-lollipop-consumer-java-sdk'
include 'core', 'assertion-rest-client-native', 'http-verifier', 'identity-service-rest-client-native', 'redis-storage'
include 'core', 'assertion-rest-client-native', 'http-verifier', 'identity-service-rest-client-native', 'redis-storage'