Hi guys, I would like to build a kotlin mpp projec...
# announcements
g
Hi guys, I would like to build a kotlin mpp project with circleci. Someone knows which configuration can I put on my
.circleci/config.yml
file to put it to work?
Copy code
version: 2
jobs:
  build:
    docker:
      - image: circleci/<language>:<version TAG>
    steps:
      - checkout
      - run: ./gradlew clean build
Specially I don’t know what I could use in the place of:
Copy code
docker:
      - image: circleci/<language>:<version TAG>
Does anyone have a suggestion of a pre-build docker image or some other configuration?
g
this should be any image with JVM support (probably circleci just has image for Java)
j
Yeah, openjdk:11-jdk has been working for us
d
g
Thanks guys 😃
@David Podhola, I think your script will help me a lot 😃
👍 1
j
that looks good. a couple comments based on our experience, take them or leave them 🙂 : - we use multi-module projects, so checksum on pom.xml is insufficient, we cache based on
{{ .Branch }}-{{ .Revision }}
with an additional fallback to
{{ .Branch }}
-
go-offline
doesn't always download everything (eg, mvn plugins vs/ dependencies), so we skip that and save before/after the mvn build - if you have integration tests or other static checks, they may be in the
verify
lifecycle, so would recommend at least doing
mvn verify
if not
install
(or
deploy
if you're pushing artifacts elsewhere)
g
Interesting, thanks @Joe.
d
Thanks @Joe too, the script is somehow dated, so I will for sure check that too. On the application level I do
mvn install
too.