mirror of
https://codeberg.org/PGPainless/wkd-java.git
synced 2025-12-05 04:41:08 +01:00
Upgrade build system
This commit is contained in:
parent
5b6b2f0846
commit
b6643b4543
6 changed files with 24 additions and 51 deletions
|
|
@ -1,6 +1,8 @@
|
|||
pipeline:
|
||||
run:
|
||||
image: gradle:7.5-jdk8
|
||||
steps:
|
||||
build:
|
||||
image: gradle:8.8-jdk11
|
||||
when:
|
||||
branch: main
|
||||
commands:
|
||||
- git checkout $CI_COMMIT_BRANCH
|
||||
# Code works
|
||||
|
|
@ -9,4 +11,6 @@ pipeline:
|
|||
- gradle check javadocAll
|
||||
# Code has coverage
|
||||
- gradle jacocoRootReport coveralls
|
||||
secrets: [COVERALLS_REPO_TOKEN]
|
||||
environment:
|
||||
COVERALLS_REPO_TOKEN:
|
||||
from_secret: COVERALLS_REPO_TOKEN
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
# Code is licensed properly
|
||||
# See https://reuse.software/
|
||||
pipeline:
|
||||
steps:
|
||||
reuse:
|
||||
when:
|
||||
branch: main
|
||||
image: fsfe/reuse:latest
|
||||
commands:
|
||||
- reuse lint
|
||||
39
build.gradle
39
build.gradle
|
|
@ -16,10 +16,6 @@ buildscript {
|
|||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'ru.vyarus.animalsniffer' version '1.5.3'
|
||||
}
|
||||
|
||||
apply from: 'version.gradle'
|
||||
|
||||
allprojects {
|
||||
|
|
@ -29,18 +25,6 @@ allprojects {
|
|||
apply plugin: 'jacoco'
|
||||
apply plugin: 'checkstyle'
|
||||
|
||||
// For non-cli modules enable android api compatibility check
|
||||
if (it.name.equals('wkd-java')) {
|
||||
// animalsniffer
|
||||
apply plugin: 'ru.vyarus.animalsniffer'
|
||||
dependencies {
|
||||
signature "net.sf.androidscents.signature:android-api-level-${minAndroidSdk}:2.3.3_r2@signature"
|
||||
}
|
||||
animalsniffer {
|
||||
sourceSets = [sourceSets.main]
|
||||
}
|
||||
}
|
||||
|
||||
// Only generate jar for submodules
|
||||
// https://stackoverflow.com/a/25445035
|
||||
jar {
|
||||
|
|
@ -49,7 +33,7 @@ allprojects {
|
|||
|
||||
// checkstyle
|
||||
checkstyle {
|
||||
toolVersion = '8.18'
|
||||
toolVersion = '10.25.0'
|
||||
}
|
||||
|
||||
group 'org.pgpainless'
|
||||
|
|
@ -76,8 +60,7 @@ allprojects {
|
|||
isReleaseVersion = !isSnapshot
|
||||
signingRequired = !(isSnapshot || isContinuousIntegrationEnvironment)
|
||||
sonatypeCredentialsAvailable = project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')
|
||||
sonatypeSnapshotUrl = 'https://oss.sonatype.org/content/repositories/snapshots'
|
||||
sonatypeStagingUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
|
||||
sonatypeStagingUrl = 'https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/'
|
||||
}
|
||||
|
||||
if (isSnapshot) {
|
||||
|
|
@ -94,7 +77,7 @@ allprojects {
|
|||
}
|
||||
|
||||
jacoco {
|
||||
toolVersion = "0.8.7"
|
||||
toolVersion = "0.8.13"
|
||||
}
|
||||
|
||||
jacocoTestReport {
|
||||
|
|
@ -102,7 +85,7 @@ allprojects {
|
|||
sourceDirectories.setFrom(project.files(sourceSets.main.allSource.srcDirs))
|
||||
classDirectories.setFrom(project.files(sourceSets.main.output))
|
||||
reports {
|
||||
xml.enabled true
|
||||
xml.required = true
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -120,15 +103,15 @@ subprojects {
|
|||
apply plugin: 'signing'
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
classifier = 'sources'
|
||||
archiveClassifier = 'sources'
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||
classifier = 'javadoc'
|
||||
archiveClassifier = 'javadoc'
|
||||
from javadoc.destinationDir
|
||||
}
|
||||
task testsJar(type: Jar, dependsOn: testClasses) {
|
||||
classifier = 'tests'
|
||||
archiveClassifier = 'tests'
|
||||
from sourceSets.test.output
|
||||
}
|
||||
|
||||
|
|
@ -172,7 +155,7 @@ subprojects {
|
|||
repositories {
|
||||
if (sonatypeCredentialsAvailable) {
|
||||
maven {
|
||||
url isSnapshot ? sonatypeSnapshotUrl : sonatypeStagingUrl
|
||||
url sonatypeStagingUrl
|
||||
credentials {
|
||||
username = sonatypeUsername
|
||||
password = sonatypePassword
|
||||
|
|
@ -225,7 +208,7 @@ task jacocoRootReport(type: JacocoReport) {
|
|||
classDirectories.setFrom(files(subprojects.sourceSets.main.output))
|
||||
executionData.setFrom(files(subprojects.jacocoTestReport.executionData))
|
||||
reports {
|
||||
xml.enabled true
|
||||
xml.required = true
|
||||
xml.destination file("${buildDir}/reports/jacoco/test/jacocoTestReport.xml")
|
||||
}
|
||||
// We could remove the following setOnlyIf line, but then
|
||||
|
|
@ -236,10 +219,6 @@ task jacocoRootReport(type: JacocoReport) {
|
|||
}
|
||||
|
||||
task javadocAll(type: Javadoc) {
|
||||
def currentJavaVersion = JavaVersion.current()
|
||||
if (currentJavaVersion.compareTo(JavaVersion.VERSION_1_9) >= 0) {
|
||||
options.addStringOption("-release", "8");
|
||||
}
|
||||
source subprojects.collect {project ->
|
||||
project.sourceSets.main.allJava }
|
||||
destinationDir = new File(buildDir, 'javadoc')
|
||||
|
|
|
|||
|
|
@ -99,17 +99,6 @@ SPDX-License-Identifier: CC0-1.0
|
|||
<property name="message" value="Indent must not use tab characters. Use space instead."/>
|
||||
</module>
|
||||
|
||||
<module name="JavadocMethod">
|
||||
<!-- TODO stricten those checks -->
|
||||
<property name="scope" value="public"/>
|
||||
<!--<property name="allowUndeclaredRTE" value="true"/>-->
|
||||
<property name="allowMissingParamTags" value="true"/>
|
||||
<property name="allowMissingThrowsTags" value="true"/>
|
||||
<property name="allowMissingReturnTag" value="true"/>
|
||||
<property name="allowMissingJavadoc" value="true"/>
|
||||
<property name="suppressLoadErrors" value="true"/>
|
||||
</module>
|
||||
|
||||
<module name="JavadocStyle">
|
||||
<property name="scope" value="public"/>
|
||||
<property name="checkEmptyJavadoc" value="true"/>
|
||||
|
|
|
|||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
|||
|
|
@ -6,17 +6,16 @@ allprojects {
|
|||
ext {
|
||||
shortVersion = '0.1.3'
|
||||
isSnapshot = true
|
||||
minAndroidSdk = 10
|
||||
javaSourceCompatibility = 1.8
|
||||
javaSourceCompatibility = 11
|
||||
jacksonDataBindVersion = '2.15.2'
|
||||
jacksonDataFormatXmlVersion = '2.15.2'
|
||||
junitVersion = '5.8.2'
|
||||
junitSysExitVersion = '1.1.2'
|
||||
jsrVersion = '3.0.2'
|
||||
slf4jVersion = '1.7.36'
|
||||
logbackVersion = '1.2.11'
|
||||
logbackVersion = '1.5.13'
|
||||
mockitoVersion = '4.5.1'
|
||||
pgpainlessVersion = '1.5.6'
|
||||
pgpainlessVersion = '1.7.7'
|
||||
pgpainlessCertDVersion = '0.2.2'
|
||||
picocliVersion = '4.6.3'
|
||||
certDJavaVersion = '0.2.2'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue