Skip to content

Commit 4e525b9

Browse files
Merge pull request #1 from piotrdytkowski/master
[US642] Update project settings (#3)
2 parents 918c702 + c6241e0 commit 4e525b9

File tree

4 files changed

+34
-136
lines changed

4 files changed

+34
-136
lines changed

azure-pipelines.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ pool:
1010
vmImage: ubuntu-latest
1111

1212
steps:
13+
- script: |
14+
git checkout $(Build.SourceBranchName)
15+
git config --global user.name "Azure DevOps"
16+
displayName: "git config"
17+
- task: MavenAuthenticate@0
18+
displayName: 'authenticate maven'
19+
inputs:
20+
artifactsFeeds: bt
1321
- task: Gradle@2
1422
inputs:
1523
workingDirectory: ''
@@ -20,4 +28,20 @@ steps:
2028
jdkArchitectureOption: 'x64'
2129
publishJUnitResults: true
2230
testResultsFiles: '**/TEST-*.xml'
23-
tasks: 'build'
31+
tasks: 'clean test'
32+
- task: Gradle@2
33+
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
34+
inputs:
35+
workingDirectory: ''
36+
gradleWrapperFile: 'gradlew'
37+
gradleOptions: '-Xmx3072m'
38+
javaHomeOption: 'JDKVersion'
39+
jdkVersionOption: '1.8'
40+
jdkArchitectureOption: 'x64'
41+
tasks: 'release -Prelease.useAutomaticVersion=true'
42+
- task: PublishPipelineArtifact@1
43+
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
44+
inputs:
45+
targetPath: $(System.DefaultWorkingDirectory)/build/libs/$(artifactName)
46+
artifactName: artifact
47+
displayName: "publish build artifact"

build.gradle

Lines changed: 3 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ buildscript {
3232

3333
plugins {
3434
id("net.ltgt.errorprone") version "0.8.1" apply false
35+
id 'net.researchgate.release' version '2.8.1'
3536
}
3637

3738
configure(allprojects) {
@@ -53,27 +54,13 @@ apply(from: "project.gradle");
5354

5455
group = "com.github.java-json-tools";
5556

56-
ext.forRelease = !version.endsWith("-SNAPSHOT");
57-
5857
/*
5958
* Repositories to use
6059
*/
6160
repositories {
6261
mavenCentral();
63-
if (!forRelease) {
64-
maven {
65-
url "https://oss.sonatype.org/content/repositories/snapshots"
66-
}
67-
}
68-
/* Allow staging references for last pre-release testing. */
69-
if (project.properties.containsKey("sonatypeUsername")) {
70-
maven {
71-
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
72-
credentials {
73-
username = project.properties["sonatypeUsername"]
74-
password = project.properties["sonatypePassword"]
75-
}
76-
}
62+
maven {
63+
url "https://pkgs.dev.azure.com/Gravity9Solutions/BT/_packaging/bt/maven/v1"
7764
}
7865
}
7966

@@ -117,15 +104,6 @@ allprojects {
117104
}
118105
}
119106

120-
/*
121-
* Javadoc: we need to tell where the overview.html is, it will not pick it up
122-
* automatically...
123-
*/
124-
125-
//javadoc {
126-
// options.overview = "src/main/java/overview.html";
127-
//}
128-
129107
task javadocJar(type: Jar, dependsOn: javadoc) {
130108
classifier = "javadoc";
131109
from javadoc.destinationDir;
@@ -142,108 +120,4 @@ wrapper {
142120
distributionUrl = "https://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip";
143121
}
144122

145-
task pom {
146-
doLast {
147-
pom {}.writeTo("${projectDir}/pom.xml");
148-
}
149-
}
150-
151-
/*
152-
* SIGNING
153-
*/
154-
155-
project.ext {
156-
scmUrl = sprintf("[email protected]:java-json-tools/%s.git", name);
157-
projectURL = sprintf("https://github.com/java-json-tools/%s", name);
158-
sonatypeStaging = "https://oss.sonatype.org/service/local/staging/deploy/maven2/";
159-
sonatypeSnapshots = "https://oss.sonatype.org/content/repositories/snapshots/";
160-
};
161-
162-
task checkSigningRequirements {
163-
doLast {
164-
def requiredProperties = [ "sonatypeUsername", "sonatypePassword" ];
165-
def noDice = false;
166-
requiredProperties.each {
167-
if (project.properties[it] == null) {
168-
noDice = true;
169-
System.err.printf("property \"%s\" is not defined!\n", it);
170-
}
171-
}
172-
if (noDice)
173-
throw new IllegalStateException("missing required properties for " +
174-
"upload");
175-
}
176-
}
177-
178-
uploadArchives {
179-
dependsOn(checkSigningRequirements);
180-
repositories {
181-
mavenDeployer {
182-
beforeDeployment {
183-
MavenDeployment deployment -> signing.signPom(deployment);
184-
}
185-
186-
repository(url: "${sonatypeStaging}") {
187-
authentication(
188-
userName: project.properties["sonatypeUsername"],
189-
password: project.properties["sonatypePassword"]
190-
);
191-
}
192-
193-
snapshotRepository(url: "${sonatypeSnapshots}") {
194-
authentication(
195-
userName: project.properties["sonatypeUsername"],
196-
password: project.properties["sonatypePassword"]
197-
);
198-
}
199-
}
200-
}
201-
}
202-
203-
/*
204-
* Configure pom.xml on install, uploadArchives
205-
*/
206-
[
207-
install.repositories.mavenInstaller,
208-
uploadArchives.repositories.mavenDeployer
209-
]*.pom*.whenConfigured { pom ->
210-
pom.project {
211-
name "${project.name}";
212-
packaging "jar";
213-
description "${project.ext.description}";
214-
url "${projectURL}";
215-
216-
scm {
217-
url "${scmUrl}";
218-
connection "${scmUrl}";
219-
developerConnection "scm:git:${scmUrl}";
220-
}
221-
222-
licenses {
223-
license {
224-
name "Lesser General Public License, version 3 or greater";
225-
url "http://www.gnu.org/licenses/lgpl.html";
226-
distribution "repo";
227-
};
228-
license {
229-
name "Apache Software License, version 2.0";
230-
url "http://www.apache.org/licenses/LICENSE-2.0";
231-
distribution "repo";
232-
}
233-
}
234-
235-
developers {
236-
developer {
237-
id "huggsboson";
238-
name "John Huffaker";
239-
240-
}
241-
}
242-
}
243-
}
244-
245-
signing {
246-
required { forRelease && gradle.taskGraph.hasTask("uploadArchives") };
247-
sign configurations.archives;
248-
}
249123

project.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
* Project-specific settings. Unfortunately we cannot put the name in there!
2222
*/
2323
group = "com.github.java-json-tools";
24-
version = "1.13";
24+
version = "2.0.0-SNAPSHOT";
2525
sourceCompatibility = JavaVersion.VERSION_1_7;
2626
targetCompatibility = JavaVersion.VERSION_1_7; // defaults to sourceCompatibility
27-
project.ext.description = "JSON Patch (RFC 6902) and JSON Merge Patch (RFC 7386) implementation in Java";
27+
project.ext.description = "JSON Patch (RFC 6902) and JSON Merge Patch (RFC 7386) implementation in Java, using extended TMF620 JsonPath syntax";
2828

2929
/*
3030
* List of dependencies
@@ -54,9 +54,9 @@ javadoc.options {
5454
}
5555
links("https://docs.oracle.com/javase/7/docs/api/");
5656
links("https://www.javadoc.io/doc/com.google.code.findbugs/jsr305/3.0.2/");
57-
links("https://fasterxml.github.com/jackson-databind/javadoc/2.11/");
58-
links("https://fasterxml.github.com/jackson-core/javadoc/2.11/");
59-
links("https://fasterxml.github.com/jackson-annotations/javadoc/2.11/");
57+
links("https://javadoc.io/doc/com.fasterxml.jackson.core/jackson-databind/2.11.4/index.html");
58+
links("https://javadoc.io/doc/com.fasterxml.jackson.core/jackson-core/2.11.4/index.html");
59+
links("https://javadoc.io/doc/com.fasterxml.jackson.core/jackson-annotations/2.11.4/index.html");
6060
links("https://www.javadoc.io/doc/com.google.guava/guava/28.2-android/");
6161
links("https://java-json-tools.github.io/msg-simple/");
6262
links("https://java-json-tools.github.io/jackson-coreutils/");

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
* - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt
1818
*/
1919

20-
rootProject.name = "json-patch";
20+
rootProject.name = "json-patch-query";

0 commit comments

Comments
 (0)