commit
dd84cac4bd
|
@ -15,4 +15,6 @@ pipelines:
|
||||||
- gradle
|
- gradle
|
||||||
name: Build and Release
|
name: Build and Release
|
||||||
script:
|
script:
|
||||||
- bash ./gradlew clean build bintrayUpload
|
- bash ./gradlew clean build
|
||||||
|
- shopt -s nullglob ; for file in ${BITBUCKET_CLONE_DIR}/build/libs/*.jar ; do curl -X POST --user "${BB_AUTH_STRING}" "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"${file}" ; done
|
||||||
|
|
||||||
|
|
48
build.gradle
48
build.gradle
|
@ -1,21 +1,7 @@
|
||||||
buildscript {
|
|
||||||
repositories {
|
|
||||||
jcenter()
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
|
|
||||||
//classpath 'com.bmuschko:gradle-clover-plugin:2.2.3'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: "idea"
|
|
||||||
apply plugin: "java-library"
|
apply plugin: "java-library"
|
||||||
apply plugin: "groovy"
|
apply plugin: "groovy"
|
||||||
apply plugin: 'maven'
|
|
||||||
apply plugin: 'jacoco'
|
apply plugin: 'jacoco'
|
||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
apply plugin: 'com.jfrog.bintray'
|
|
||||||
//apply from: "${project.projectDir}/gradle/clover.gradle"
|
|
||||||
|
|
||||||
sourceCompatibility = 1.8
|
sourceCompatibility = 1.8
|
||||||
targetCompatibility = 1.8
|
targetCompatibility = 1.8
|
||||||
|
@ -27,16 +13,16 @@ repositories {
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
implementation("org.slf4j:slf4j-api:${slf4jVersion}")
|
implementation("org.slf4j:slf4j-api:${slf4jVersion}")
|
||||||
api('com.google.code.gson:gson:2.8.5')
|
api('com.google.code.gson:gson:2.8.9')
|
||||||
api("com.squareup.okhttp3:okhttp:4.1.0")
|
api('com.squareup.okhttp3:okhttp:4.9.3')
|
||||||
|
|
||||||
testImplementation("org.slf4j:slf4j-simple:${slf4jVersion}")
|
testImplementation("org.slf4j:slf4j-simple:${slf4jVersion}")
|
||||||
testImplementation('com.squareup.okhttp3:mockwebserver:4.1.0')
|
testImplementation('com.squareup.okhttp3:mockwebserver:4.9.3')
|
||||||
testCompile("org.codehaus.groovy:groovy-all:${groovyVersion}")
|
testImplementation("org.codehaus.groovy:groovy-all:${groovyVersion}")
|
||||||
testCompile("org.spockframework:spock-core:${spockVersion}") {
|
testImplementation("org.spockframework:spock-core:${spockVersion}") {
|
||||||
exclude group: "org.codehaus.groovy"
|
exclude group: "org.codehaus.groovy"
|
||||||
}
|
}
|
||||||
testCompile( 'com.athaydes:spock-reports:1.6.2' ) {
|
testImplementation('com.athaydes:spock-reports:2.1.1-groovy-3.0') {
|
||||||
transitive = false // this avoids affecting your version of Groovy/Spock
|
transitive = false // this avoids affecting your version of Groovy/Spock
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,31 +39,15 @@ publishing {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bintray {
|
|
||||||
user = System.getenv('BINTRAY_USER')
|
|
||||||
key = System.getenv('BINTRAY_KEY')
|
|
||||||
|
|
||||||
override = true
|
|
||||||
configurations = ['archives']
|
|
||||||
pkg {
|
|
||||||
repo = "libs"
|
|
||||||
name = "libpaqle"
|
|
||||||
websiteUrl = siteUrl
|
|
||||||
vcsUrl = gitUrl
|
|
||||||
licenses = licenses
|
|
||||||
publish = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
jacoco {
|
jacoco {
|
||||||
toolVersion = "0.8.4"
|
toolVersion = "0.8.7"
|
||||||
}
|
}
|
||||||
|
|
||||||
jacocoTestReport {
|
jacocoTestReport {
|
||||||
group = "verification"
|
group = "verification"
|
||||||
reports {
|
reports {
|
||||||
xml.enabled false
|
xml.required = false
|
||||||
csv.enabled false
|
csv.required = false
|
||||||
html.destination file("${buildDir}/reports/coverage")
|
html.destination file("${buildDir}/reports/coverage")
|
||||||
}
|
}
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
id = libpaqle
|
id = libpaqle
|
||||||
group = biz.nellemann.libs
|
group = biz.nellemann.libs
|
||||||
version = 1.0.2
|
version = 1.0.3
|
||||||
licenses = ['APACHE-2.0'] // or something else
|
licenses = ['APACHE-2.0'] // or something else
|
||||||
groovyVersion = 2.5.8
|
groovyVersion = 3.0.9
|
||||||
slf4jVersion = 1.7.28
|
slf4jVersion = 1.7.32
|
||||||
spockVersion = 1.3-groovy-2.5
|
spockVersion = 2.0-groovy-3.0
|
||||||
siteUrl = https://bitbucket.org/mnellemann/libpaqle
|
siteUrl = https://bitbucket.org/mnellemann/libpaqle
|
||||||
gitUrl = https://bitbucket.org/mnellemann/libpaqle.git
|
gitUrl = https://bitbucket.org/mnellemann/libpaqle.git
|
||||||
|
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,5 +1,5 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
package biz.nellemann.libpaqle;
|
package biz.nellemann.libpaqle;
|
||||||
|
|
||||||
import biz.nellemann.libpaqle.pojo.PaqleResponse;
|
import biz.nellemann.libpaqle.pojo.PaqleResponse;
|
||||||
import java.io.IOException;
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
import com.google.gson.JsonSyntaxException;
|
import com.google.gson.JsonSyntaxException;
|
||||||
|
@ -51,7 +50,7 @@ public class Paqle {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected String get(String url) throws IOException, Exception {
|
protected String get(String url) throws Exception {
|
||||||
|
|
||||||
String credential = Credentials.basic(basicUsername, basicPassword);
|
String credential = Credentials.basic(basicUsername, basicPassword);
|
||||||
|
|
||||||
|
@ -77,7 +76,7 @@ public class Paqle {
|
||||||
|
|
||||||
protected String getJson(String vatNumber) throws Exception {
|
protected String getJson(String vatNumber) throws Exception {
|
||||||
//String cvrIds = String.join(",", vatNumbers);
|
//String cvrIds = String.join(",", vatNumbers);
|
||||||
String jsonText = get(baseUrl + "/entities?customer=" + company + "&news&vatNumbers=" + "DK"+vatNumber);
|
String jsonText = get(baseUrl + "/entities?customer=" + company + "&news&vatNumbers=" + "DK" + vatNumber);
|
||||||
log.debug("getJson() response: " + jsonText);
|
log.debug("getJson() response: " + jsonText);
|
||||||
return jsonText;
|
return jsonText;
|
||||||
}
|
}
|
||||||
|
|
6
src/test/resources/simplelogger.properties
Normal file
6
src/test/resources/simplelogger.properties
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
org.slf4j.simpleLogger.logFile=System.out
|
||||||
|
org.slf4j.simpleLogger.showDateTime=true
|
||||||
|
org.slf4j.simpleLogger.showShortLogName=true
|
||||||
|
org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss.SSS
|
||||||
|
org.slf4j.simpleLogger.levelInBrackets=true
|
||||||
|
#org.slf4j.simpleLogger.defaultLogLevel=debug
|
Loading…
Reference in a new issue