diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..3863f24af668d45056a468f276e572354b2d0481 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,35 @@ +variables: + GIT_SUBMODULE_STRATEGY: recursive + GIT_DEPTH: 1000 + +stages: + - build + - publish + +cache: + paths: + - .gradle/wrapper + - .gradle/caches + +build: + image: maven:3-jdk-8 + stage: build + script: + - ./gradlew --console=plain --no-daemon assemble jar + artifacts: + paths: + - "message_generation/build/libs" + expire_in: 1 week + + +publish: + image: maven:3-jdk-8 + stage: publish + needs: + - build + script: + - "./gradlew publish" + only: + - main + + diff --git a/README.md b/README.md index ed8245b701ee1197c0deabd46429060ef74a6cae..645a6eb29da4cffb3a41bcf837e6e7a7146f4329 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -See [rosjava_core](https://github.com/rosjava/rosjava_core) readme. +See [rosjava_core](https://git-st.inf.tu-dresden.de/ceti/ros/ros-java-packages/rosjava-core-gradle) readme. diff --git a/build.gradle b/build.gradle index cf7739cc9b7a50a5bb277307a4cd5ab20867deb3..4b8c154a6ed503ac2ddb8ac5e33c21ea830c1b14 100644 --- a/build.gradle +++ b/build.gradle @@ -31,36 +31,32 @@ subprojects { sourceCompatibility = 1.6 targetCompatibility = 1.6 - // These external repositories are copied from bootstrap.gradle. - repositories { - jcenter() - maven { - url "http://repository.springsource.com/maven/bundles/release" - } - maven { - url "http://repository.springsource.com/maven/bundles/external" - } - } - - // Configuration of the deployment repository is copied from the RosPlugin. - String mavenDeploymentRepository = System.getenv("ROS_MAVEN_DEPLOYMENT_REPOSITORY") - if (mavenDeploymentRepository != null && - mavenDeploymentRepository != "") { - publishing { - publications { - mavenJava(MavenPublication) { - from components.java + publishing { + publications { + maven(MavenPublication) { + artifactId = 'rosjava' + artifact("message_generation/build/libs/message_generation-${version}.jar") { + extension 'jar' + } } - } - repositories { + } + repositories { maven { - url 'file://' + mavenDeploymentRepository + url "https://git-st.inf.tu-dresden.de/api/v4/projects/1108/packages/maven" + + credentials(HttpHeaderCredentials) { + name = 'Job-Token' + value = System.getenv("CI_JOB_TOKEN") + } + authentication { + header(HttpHeaderAuthentication) + } } - } + } - } else { - logger.warn("ROS_MAVEN_DEPLOYMENT_REPOSITORY is not set. Have you sourced setup.bash?") - } } + + + defaultTasks 'publish', 'installDist'