Skip to content

Commit

Permalink
Update build settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres Almiray authored and aalmiray committed Jun 3, 2024
1 parent 95b40e4 commit fd6201f
Show file tree
Hide file tree
Showing 23 changed files with 73 additions and 52 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build

on: [push, pull_request]

jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
CI: true
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/cache@v1
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradlew') }}
restore-keys: |
${{ runner.os }}-gradlew-
- uses: eskatos/gradle-command-action@v1
with:
arguments: build -S
1 change: 1 addition & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:project-version: 3.0.1

image:http://img.shields.io/travis/{project-owner}/{project-name}/master.svg["Build Status (travis)", link="https://travis-ci.org/{project-owner}/{project-name}"]
image:https://github.com/{project-owner}/{project-name}/workflows/Build/badge.svg["Build Status", link="https://github.com/{project-owner}/{project-name}/actions"]
image:http://img.shields.io/badge/license-ASL2-blue.svg["ASL2 Licensed", link="http://opensource.org/licenses/ASL2"]
image:https://api.bintray.com/packages/{project-owner}/{project-repo}/{project-name}/images/download.svg[link="https://bintray.com/{project-owner}/{project-repo}/{project-name}/_latestVersion"]
image:https://img.shields.io/maven-central/v/{project-group}/{project-name}-core.svg[Download, link="https://search.maven.org/#search|ga|1|{project-name}"]
Expand Down
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* limitations under the License.
*/
plugins {
id 'org.kordamp.gradle.kordamp-parentpom'
id 'org.kordamp.gradle.clirr'
}

Expand Down
4 changes: 2 additions & 2 deletions subprojects/guide/guide.gradle → docs/guide/guide.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies {
asciidoctor {
configurations 'asciidoctorExtensions'
attributes = [
'gradle-version' : project.gradle.gradleVersion,
'source-highlighter' : 'prettify'
'gradle-version' : project.gradle.gradleVersion,
'source-highlighter': 'prettify'
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@

group = org.kordamp.json
version = 3.0.2-SNAPSHOT
sourceCompatibility = 1.7
targetCompatibility = 1.7
sourceCompatibility = 1.8
targetCompatibility = 1.8

previousVersion = 3.0.1
commonsLangVersion = 3.9
commonsBeanutilsVersion = 1.9.3
junitVersion = 4.13
slf4jVersion = 1.7.30
kordampPluginVersion = 0.31.2
kordampPomVersion = 1.10.2
gitPluginVersion = 0.3.2
kordampPluginVersion = 0.34.0
kordampBuildVersion = 1.0.0
gitPluginVersion = 2.1.3

org.gradle.daemon = true
org.gradle.caching = true
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 3 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

Expand Down
29 changes: 20 additions & 9 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,37 @@ pluginManagement {
mavenLocal()
}
plugins {
id 'org.kordamp.gradle.kordamp-parentpom' version kordampPomVersion
id 'org.kordamp.gradle.clirr' version kordampPluginVersion
id 'org.kordamp.gradle.guide' version kordampPluginVersion
id 'org.ajoberstar.git-publish' version gitPluginVersion
id 'org.kordamp.gradle.clirr' version kordampPluginVersion
id 'org.kordamp.gradle.guide' version kordampPluginVersion
id 'org.ajoberstar.git-publish' version gitPluginVersion
}
}

buildscript {
repositories {
gradlePluginPortal()
jcenter()
mavenLocal()
}
dependencies {
classpath "org.kordamp.gradle:settings-gradle-plugin:$kordampPluginVersion"
classpath "org.kordamp.gradle:kordamp-parentbuild:$kordampBuildVersion"
}
}
apply plugin: 'org.kordamp.gradle.settings'
apply plugin: 'org.kordamp.gradle.kordamp-parentbuild'

rootProject.name = 'json-lib'

projects {
directories = ['subprojects']
}
enforce {
rule(enforcer.rules.ExcludeDependencies) { r ->
r.exclude('commons-logging:commons-logging')
r.exclude('org.slf4j:slf4j-compile')
}
rule(enforcer.rules.ForceDependencies) { r ->
r.dependencies.addAll 'xml-apis:xml-apis:2.0.2',
"org.apache.commons:commons-lang3:$commonsLangVersion",
"org.slf4j:slf4j-api:$slf4jVersion",
"junit:junit:$junitVersion",
"commons-beanutils:commons-beanutils:$commonsBeanutilsVersion",
"org.slf4j:jcl-over-slf4j:$slf4jVersion"
}
}
44 changes: 10 additions & 34 deletions subprojects/json-lib-core/json-lib-core.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,47 +21,23 @@ plugins {

config {
clirr {
// enabled = false
baseline = [project.group, project.name, project.previousVersion].join(':')
}
}

configurations.all {
resolutionStrategy.force 'xml-apis:xml-apis:2.0.2',
"org.apache.commons:commons-lang3:$commonsLangVersion",
"org.slf4j:slf4j-api:$slf4jVersion",
"junit:junit:$junitVersion",
"commons-beanutils:commons-beanutils:$commonsBeanutilsVersion",
"org.slf4j:jcl-over-slf4j:$slf4jVersion"
}

dependencies {
def compileExcludingCommonsLogging = { String dependency ->
compile(dependency) {
exclude group: 'commons-logging', module: 'commons-logging'
}
}
api("junit:junit:$junitVersion")
api("commons-beanutils:commons-beanutils:$commonsBeanutilsVersion")
api('org.apache.commons:commons-collections4:4.4')
api("org.apache.commons:commons-lang3:$commonsLangVersion")

def testCompileExcludingCommonsLogging = { String dependency ->
testCompile(dependency) {
exclude group: 'commons-logging', module: 'commons-logging'
}
}

compile("junit:junit:$junitVersion")
compileExcludingCommonsLogging("commons-beanutils:commons-beanutils:$commonsBeanutilsVersion")
compileExcludingCommonsLogging('org.apache.commons:commons-collections4:4.4')
compileExcludingCommonsLogging("org.apache.commons:commons-lang3:$commonsLangVersion")

compile("org.slf4j:slf4j-api:$slf4jVersion")
compile("org.slf4j:jcl-over-slf4j:$slf4jVersion") {
exclude group: 'org.slf4j', module: 'slf4j-compile'
}
api("org.slf4j:slf4j-api:$slf4jVersion")
api("org.slf4j:jcl-over-slf4j:$slf4jVersion")

// the following should be marked as optional
compileExcludingCommonsLogging('xom:xom:1.3.2')
compileExcludingCommonsLogging('org.kordamp.ezmorph:ezmorph-core:3.0.0')
api('xom:xom:1.3.2')
api('org.kordamp.ezmorph:ezmorph-core:3.0.0')

testCompileExcludingCommonsLogging('xmlunit:xmlunit:1.6')
testCompile('uk.org.lidalia:slf4j-test:1.2.0')
testImplementation('xmlunit:xmlunit:1.6')
testImplementation('uk.org.lidalia:slf4j-test:1.2.0')
}

0 comments on commit fd6201f

Please sign in to comment.