File tree 25 files changed +127
-67
lines changed
tools/ci-scripts/linux/image-builder
25 files changed +127
-67
lines changed Original file line number Diff line number Diff line change 1
1
find_program (GRADLE_EXECUTABLE gradle)
2
- find_program (MAVEN_EXECUTABLE mvn)
3
2
4
3
if (GRADLE_EXECUTABLE)
5
4
execute_process (
@@ -10,13 +9,3 @@ if (GRADLE_EXECUTABLE)
10
9
else ()
11
10
message (FATAL_ERROR "gradle was not found. Java code cannot be built." )
12
11
endif ()
13
-
14
- if (MAVEN_EXECUTABLE)
15
- execute_process (
16
- COMMAND ${MAVEN_EXECUTABLE} --version
17
- OUTPUT_VARIABLE maven_version)
18
- message (STATUS "maven found at ${MAVEN_EXECUTABLE} " )
19
- message (STATUS "${maven_version} " )
20
- else ()
21
- message (FATAL_ERROR "maven was not found. Java code cannot be built." )
22
- endif ()
Original file line number Diff line number Diff line change @@ -30,26 +30,3 @@ function (add_gradle_build target)
30
30
add_target_to_folder("${target} " )
31
31
add_dependencies (java "${target} " )
32
32
endfunction ()
33
-
34
- function (add_maven_install target )
35
- set (oneValueArgs AFTER_BUILD JAR)
36
- cmake_parse_arguments (arg "${flagArgs} " "${oneValueArgs} " "${multiValueArgs} " ${ARGN} )
37
-
38
- # The path given to -DpomFile is hard-coded to match the output path of
39
- # gradle's maven plugin.
40
- add_custom_command (
41
- COMMAND
42
- ${MAVEN_EXECUTABLE}
43
- install :install -file
44
- -DpomFile=build /poms/pom-default.xml
45
- -Dfile=build /libs/${arg_JAR}
46
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
47
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR} /build /java/${target} )
48
-
49
- add_custom_target ("${target} "
50
- DEPENDS ${arg_AFTER_BUILD}
51
- ${CMAKE_CURRENT_BINARY_DIR} /build /java/${target} )
52
-
53
- add_target_to_folder("${target} " )
54
- add_dependencies (java "${target} " )
55
- endfunction ()
Original file line number Diff line number Diff line change @@ -20,11 +20,12 @@ mainClassName = 'org.bondlib.examples.BlobExample'
20
20
applicationDefaultJvmArgs = [' -ea' ]
21
21
22
22
repositories {
23
+ mavenLocal()
23
24
mavenCentral()
24
25
}
25
26
26
27
dependencies {
27
- compile files( ' ../../../../java/core/build/libs/ bond-5.0.0.jar ' )
28
+ compile ' org.bondlib: bond:+ '
28
29
}
29
30
30
31
compileBond {
Original file line number Diff line number Diff line change @@ -20,11 +20,12 @@ mainClassName = 'org.bondlib.examples.Enumerations'
20
20
applicationDefaultJvmArgs = [' -ea' ]
21
21
22
22
repositories {
23
+ mavenLocal()
23
24
mavenCentral()
24
25
}
25
26
26
27
dependencies {
27
- compile files( ' ../../../../java/core/build/libs/ bond-5.0.0.jar ' )
28
+ compile ' org.bondlib: bond:+ '
28
29
}
29
30
30
31
compileBond {
Original file line number Diff line number Diff line change @@ -20,11 +20,12 @@ mainClassName = 'org.bondlib.examples.GenericTree'
20
20
applicationDefaultJvmArgs = [' -ea' ]
21
21
22
22
repositories {
23
+ mavenLocal()
23
24
mavenCentral()
24
25
}
25
26
26
27
dependencies {
27
- compile files( ' ../../../../java/core/build/libs/ bond-5.0.0.jar ' )
28
+ compile ' org.bondlib: bond:+ '
28
29
}
29
30
30
31
compileBond {
Original file line number Diff line number Diff line change @@ -20,11 +20,12 @@ mainClassName = 'org.bondlib.examples.Generics'
20
20
applicationDefaultJvmArgs = [' -ea' ]
21
21
22
22
repositories {
23
+ mavenLocal()
23
24
mavenCentral()
24
25
}
25
26
26
27
dependencies {
27
- compile files( ' ../../../../java/core/build/libs/ bond-5.0.0.jar ' )
28
+ compile ' org.bondlib: bond:+ '
28
29
}
29
30
30
31
compileBond {
Original file line number Diff line number Diff line change @@ -20,11 +20,12 @@ mainClassName = 'org.bondlib.examples.Imports'
20
20
applicationDefaultJvmArgs = [' -ea' ]
21
21
22
22
repositories {
23
+ mavenLocal()
23
24
mavenCentral()
24
25
}
25
26
26
27
dependencies {
27
- compile files( ' ../../../../java/core/build/libs/ bond-5.0.0.jar ' )
28
+ compile ' org.bondlib: bond:+ '
28
29
}
29
30
30
31
compileBond {
Original file line number Diff line number Diff line change @@ -20,11 +20,12 @@ mainClassName = 'org.bondlib.examples.Inheritance'
20
20
applicationDefaultJvmArgs = [' -ea' ]
21
21
22
22
repositories {
23
+ mavenLocal()
23
24
mavenCentral()
24
25
}
25
26
26
27
dependencies {
27
- compile files( ' ../../../../java/core/build/libs/ bond-5.0.0.jar ' )
28
+ compile ' org.bondlib: bond:+ '
28
29
}
29
30
30
31
compileBond {
Original file line number Diff line number Diff line change @@ -20,11 +20,12 @@ mainClassName = 'org.bondlib.examples.NothingDefault'
20
20
applicationDefaultJvmArgs = [' -ea' ]
21
21
22
22
repositories {
23
+ mavenLocal()
23
24
mavenCentral()
24
25
}
25
26
26
27
dependencies {
27
- compile files( ' ../../../../java/core/build/libs/ bond-5.0.0.jar ' )
28
+ compile ' org.bondlib: bond:+ '
28
29
}
29
30
30
31
compileBond {
Original file line number Diff line number Diff line change @@ -20,11 +20,12 @@ mainClassName = 'org.bondlib.examples.PolymorphicContainer'
20
20
applicationDefaultJvmArgs = [' -ea' ]
21
21
22
22
repositories {
23
+ mavenLocal()
23
24
mavenCentral()
24
25
}
25
26
26
27
dependencies {
27
- compile files( ' ../../../../java/core/build/libs/ bond-5.0.0.jar ' )
28
+ compile ' org.bondlib: bond:+ '
28
29
}
29
30
30
31
compileBond {
Original file line number Diff line number Diff line change @@ -20,11 +20,12 @@ mainClassName = 'org.bondlib.examples.ProtocolVersions'
20
20
applicationDefaultJvmArgs = [' -ea' ]
21
21
22
22
repositories {
23
+ mavenLocal()
23
24
mavenCentral()
24
25
}
25
26
26
27
dependencies {
27
- compile files( ' ../../../../java/core/build/libs/ bond-5.0.0.jar ' )
28
+ compile ' org.bondlib: bond:+ '
28
29
}
29
30
30
31
compileBond {
Original file line number Diff line number Diff line change @@ -20,11 +20,12 @@ mainClassName = 'org.bondlib.examples.RecordStreaming'
20
20
applicationDefaultJvmArgs = [' -ea' ]
21
21
22
22
repositories {
23
+ mavenLocal()
23
24
mavenCentral()
24
25
}
25
26
26
27
dependencies {
27
- compile files( ' ../../../../java/core/build/libs/ bond-5.0.0.jar ' )
28
+ compile ' org.bondlib: bond:+ '
28
29
}
29
30
30
31
compileBond {
Original file line number Diff line number Diff line change @@ -20,11 +20,12 @@ mainClassName = 'org.bondlib.examples.RuntimeSchemaExample'
20
20
applicationDefaultJvmArgs = [' -ea' ]
21
21
22
22
repositories {
23
+ mavenLocal()
23
24
mavenCentral()
24
25
}
25
26
26
27
dependencies {
27
- compile files( ' ../../../../java/core/build/libs/ bond-5.0.0.jar ' )
28
+ compile ' org.bondlib: bond:+ '
28
29
}
29
30
30
31
compileBond {
Original file line number Diff line number Diff line change @@ -20,11 +20,12 @@ mainClassName = 'org.bondlib.examples.SchemaView'
20
20
applicationDefaultJvmArgs = [' -ea' ]
21
21
22
22
repositories {
23
+ mavenLocal()
23
24
mavenCentral()
24
25
}
25
26
26
27
dependencies {
27
- compile files( ' ../../../../java/core/build/libs/ bond-5.0.0.jar ' )
28
+ compile ' org.bondlib: bond:+ '
28
29
}
29
30
30
31
compileBond {
Original file line number Diff line number Diff line change @@ -20,11 +20,12 @@ mainClassName = 'org.bondlib.examples.Serialization'
20
20
applicationDefaultJvmArgs = [' -ea' ]
21
21
22
22
repositories {
23
+ mavenLocal()
23
24
mavenCentral()
24
25
}
25
26
26
27
dependencies {
27
- compile files( ' ../../../../java/core/build/libs/ bond-5.0.0.jar ' )
28
+ compile ' org.bondlib: bond:+ '
28
29
}
29
30
30
31
compileBond {
Original file line number Diff line number Diff line change @@ -20,11 +20,12 @@ mainClassName = 'org.bondlib.examples.UntaggedProtocols'
20
20
applicationDefaultJvmArgs = [' -ea' ]
21
21
22
22
repositories {
23
+ mavenLocal()
23
24
mavenCentral()
24
25
}
25
26
26
27
dependencies {
27
- compile files( ' ../../../../java/core/build/libs/ bond-5.0.0.jar ' )
28
+ compile ' org.bondlib: bond:+ '
28
29
}
29
30
30
31
compileBond {
Original file line number Diff line number Diff line change @@ -4,4 +4,5 @@ set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake)
4
4
5
5
include (Java)
6
6
7
- add_gradle_build (java-compat DEPENDS java-core)
7
+ add_gradle_build (java-compat
8
+ DEPENDS java-core)
Original file line number Diff line number Diff line change
1
+ // Copyright (c) Microsoft. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
1
4
group ' org.bondlib'
2
- version ' 1 .0'
5
+ version ' 0 .0'
3
6
4
7
buildscript {
5
8
repositories {
@@ -18,11 +21,12 @@ apply plugin: 'org.bondlib.gradle'
18
21
sourceCompatibility = 1.8
19
22
20
23
repositories {
24
+ mavenLocal()
21
25
mavenCentral()
22
26
}
23
27
24
28
dependencies {
25
- compile files( ' ../core/build/libs/ bond-5.0.0.jar ' )
29
+ compile ' org.bondlib: bond:+ '
26
30
testCompile group : ' junit' , name : ' junit' , version : ' 4.12'
27
31
}
28
32
Original file line number Diff line number Diff line change @@ -4,4 +4,6 @@ set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake)
4
4
5
5
include (Java)
6
6
7
- add_gradle_build (java-core DEPENDS gradle-plugin-install )
7
+ add_gradle_build (java-core
8
+ GRADLE_TARGET install
9
+ DEPENDS gradle-plugin)
Original file line number Diff line number Diff line change 1
1
// Copyright (c) Microsoft. All rights reserved.
2
2
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
4
- group ' org.bondlib'
5
- version = ' 5.0.0'
6
-
7
4
buildscript {
8
5
repositories {
9
6
mavenLocal()
@@ -15,9 +12,18 @@ buildscript {
15
12
}
16
13
}
17
14
15
+ plugins {
16
+ id ' com.palantir.git-version' version ' 0.9.1'
17
+ }
18
+
18
19
apply plugin : ' java'
20
+ apply plugin : ' maven'
21
+ apply plugin : ' maven-publish'
19
22
apply plugin : ' org.bondlib.gradle'
20
23
24
+ group ' org.bondlib'
25
+ version gitVersion(prefix :' java@' )
26
+
21
27
sourceCompatibility = 1.6
22
28
23
29
repositories {
@@ -28,6 +34,26 @@ dependencies {
28
34
testCompile ' junit:junit:4.12'
29
35
}
30
36
37
+ publishing {
38
+ repositories {
39
+ maven {
40
+ url ' https://msazure.pkgs.visualstudio.com/_packaging/Bond/maven/v1'
41
+ credentials {
42
+ username " VSTS"
43
+ password project. hasProperty(' vstsMavenAccessToken' ) ? " ${ vstsMavenAccessToken} " : ' '
44
+ }
45
+ }
46
+ }
47
+
48
+ publications {
49
+ mavenJava(MavenPublication ) {
50
+ from components. java
51
+ }
52
+ }
53
+ }
54
+
55
+ // Some tests have non-ASCII strings that are UTF-8 encoded. In environments
56
+ // with system encodings other than UTF-8, javac will fail on those tests.
31
57
compileTestJava {
32
58
options. encoding = ' UTF-8'
33
59
}
Original file line number Diff line number Diff line change @@ -4,7 +4,5 @@ set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake)
4
4
5
5
include (Java)
6
6
7
- add_gradle_build (gradle-plugin GRADLE_TARGET install )
8
- add_maven_install (gradle-plugin-install
9
- AFTER_BUILD gradle-plugin
10
- JAR bond-gradle-1.0.jar)
7
+ add_gradle_build (gradle-plugin
8
+ GRADLE_TARGET install )
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ containing this README and repeat as follows:
3
3
4
4
* write some code
5
5
* ` gradle build install `
6
- * ` mvn install:install-file -Dfile=build/libs/bond-gradle-1.0.jar -DpomFile=build/poms/pom-default.xml `
7
6
8
7
This will install the plugin to your local maven repository, which the other
9
8
Java projects' build.gradles will use in preference to maven central.
Original file line number Diff line number Diff line change
1
+ // Copyright (c) Microsoft. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ plugins {
5
+ id ' com.palantir.git-version' version ' 0.9.1'
6
+ }
7
+
1
8
apply plugin : ' groovy'
2
9
apply plugin : ' maven'
10
+ apply plugin : ' maven-publish'
3
11
4
12
group ' org.bondlib'
5
- version ' 1.0 '
13
+ version gitVersion( prefix : ' java@ ' )
6
14
7
15
dependencies {
8
16
compile localGroovy()
9
17
compile gradleApi()
10
18
}
11
19
12
- jar {
20
+ publishing {
21
+ repositories {
22
+ maven {
23
+ url ' https://msazure.pkgs.visualstudio.com/_packaging/Bond/maven/v1'
24
+ credentials {
25
+ username " VSTS"
26
+ password project. hasProperty(' vstsMavenAccessToken' ) ? " ${ vstsMavenAccessToken} " : ' '
27
+ }
28
+ }
29
+ }
30
+
31
+ publications {
32
+ mavenJava(MavenPublication ) {
33
+ from components. java
34
+ }
35
+ }
13
36
}
You can’t perform that action at this time.
0 commit comments