diff --git a/.gitignore b/.gitignore
index 40d9acab97dccc23675a97552b12baa68895eda0..b974351ba37e3f02f4141349081a9927f12dc656 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
-/target
-/.idea
\ No newline at end of file
+/build
+/.idea
+/.gradle
\ No newline at end of file
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 010a802280de82960f2d1b4e91b54a175643217d..9247aa602d5eae1e54a1629e3e168f9b737befe5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,10 +1,11 @@
 package:
   image:
-    name: maven:3-openjdk-11
+    name: gradle:jdk11
   script:
-    - mvn clean install
+    - gradle jar shadowjar
   artifacts:
     paths:
-      - target/keycloak-scim-1.0-SNAPSHOT-jar-with-dependencies.jar
+      - build/libs/keycloak-scim-1.0-SNAPSHOT.jar
+      - build/libs/keycloak-scim-1.0-SNAPSHOT-all.jar
   only:
     - main
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000000000000000000000000000000000000..92af4ee2413c61a71aef2d2a85ef199fc7454629
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,40 @@
+plugins {
+    id 'java'
+    id 'com.github.johnrengelman.shadow' version '7.1.2'
+}
+
+group = 'sh.libre.scim'
+version = '1.0-SNAPSHOT'
+description = 'keycloak-scim'
+
+java.sourceCompatibility = JavaVersion.VERSION_11
+
+repositories {
+    mavenLocal()
+    mavenCentral()
+}
+
+dependencies {
+    compileOnly 'org.keycloak:keycloak-core:18.0.0'
+    compileOnly 'org.keycloak:keycloak-server-spi:18.0.0'
+    compileOnly 'org.keycloak:keycloak-server-spi-private:18.0.0'
+    compileOnly 'org.keycloak:keycloak-services:18.0.0'
+    compileOnly 'org.keycloak:keycloak-model-jpa:18.0.0'
+    implementation 'io.github.resilience4j:resilience4j-retry:1.7.0'
+    implementation('com.unboundid.product.scim2:scim2-sdk-client:2.3.7') {
+        transitive false
+    }
+    implementation('com.unboundid.product.scim2:scim2-sdk-common:2.3.7') {
+        transitive false
+    }
+    implementation('org.wildfly.client:wildfly-client-config:1.0.1.Final') {
+        transitive false
+    }
+    implementation('org.jboss.resteasy:resteasy-client:4.7.6.Final') {
+        transitive false
+    }
+    implementation('org.jboss.resteasy:resteasy-client-api:4.7.6.Final') {
+        transitive false
+    }
+
+}
diff --git a/docker-compose.yml b/docker-compose.yml
index 3c090232a63e45b63bcb6171d868a9bf6613f12f..d18aa1ef3ef7fd0c246f6a495f003060dbd2daa1 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -11,19 +11,18 @@ services:
     ports:
       - 5432:5432
   keycloak:
-    image: quay.io/keycloak/keycloak:16.1.1
+    image: quay.io/keycloak/keycloak:18.0.0
+    build: .
+    command: start-dev
     volumes:
-      - ./target/keycloak-scim-1.0-SNAPSHOT-jar-with-dependencies.jar:/opt/jboss/keycloak/standalone/deployments/keycloak-scim-1.0-SNAPSHOT.jar
+      - ./build/libs/keycloak-scim-1.0-SNAPSHOT-all.jar:/opt/keycloak/providers/keycloak-scim-1.0-SNAPSHOT-all.jar
     environment:
-      DB_VENDOR: POSTGRES
-      DB_ADDR: postgres
-      DB_DATABASE: keycloak
-      DB_USER: keycloak
-      DB_SCHEMA: public
-      DB_PASSWORD: keycloak
-      KEYCLOAK_USER: admin
-      KEYCLOAK_PASSWORD: admin
-      KEYCLOAK_LOGLEVEL: DEBUG
+      KC_DB: postgres
+      KC_DB_URL_HOST: postgres
+      KC_DB_USERNAME: keycloak
+      KC_DB_PASSWORD: keycloak
+      KEYCLOAK_ADMIN: admin
+      KEYCLOAK_ADMIN_PASSWORD: admin
     ports:
       - 127.0.0.1:8080:8080
     depends_on:
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 866b05a69a2a17678cf87947f68c1b793fd10c17..0000000000000000000000000000000000000000
--- a/pom.xml
+++ /dev/null
@@ -1,188 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>sh.libre.scim</groupId>
-  <artifactId>keycloak-scim</artifactId>
-  <version>1.0-SNAPSHOT</version>
-
-  <name>keycloak-scim</name>
-  <!-- FIXME change it to the project's website -->
-  <url>http://www.example.com</url>
-
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <maven.compiler.source>11</maven.compiler.source>
-    <maven.compiler.target>11</maven.compiler.target>
-    <keycloak.version>16.1.0</keycloak.version>
-    <kotlin.version>1.6.10</kotlin.version>
-    <jackson.version>2.12.1</jackson.version>
-    <resteasy.version>3.15.1.Final</resteasy.version>
-    <resilience4jVersion>1.7.0</resilience4jVersion>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.keycloak</groupId>
-      <artifactId>keycloak-core</artifactId>
-      <scope>provided</scope>
-      <version>${keycloak.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.keycloak</groupId>
-      <artifactId>keycloak-server-spi</artifactId>
-      <scope>provided</scope>
-      <version>${keycloak.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.keycloak</groupId>
-      <artifactId>keycloak-server-spi-private</artifactId>
-      <scope>provided</scope>
-      <version>${keycloak.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.keycloak</groupId>
-      <artifactId>keycloak-services</artifactId>
-      <scope>provided</scope>
-      <version>${keycloak.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.keycloak</groupId>
-      <artifactId>keycloak-model-jpa</artifactId>
-      <scope>provided</scope>
-      <version>${keycloak.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>com.unboundid.product.scim2</groupId>
-      <artifactId>scim2-sdk-client</artifactId>
-      <version>2.3.7</version>
-    </dependency>
-    <dependency>
-      <groupId>javax.ws.rs</groupId>
-      <artifactId>javax.ws.rs-api</artifactId>
-      <version>2.1.1</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>javax.xml.bind</groupId>
-      <artifactId>jaxb-api</artifactId>
-      <version>2.3.1</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.core</groupId>
-      <artifactId>jackson-core</artifactId>
-      <version>${jackson.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.core</groupId>
-      <artifactId>jackson-databind</artifactId>
-      <version>${jackson.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.core</groupId>
-      <artifactId>jackson-annotations</artifactId>
-      <version>${jackson.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.module</groupId>
-      <artifactId>jackson-module-jaxb-annotations</artifactId>
-      <version>${jackson.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.datatype</groupId>
-      <artifactId>jackson-datatype-jdk8</artifactId>
-      <version>${jackson.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.jaxrs</groupId>
-      <artifactId>jackson-jaxrs-json-provider</artifactId>
-      <version>${jackson.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.jaxrs</groupId>
-      <artifactId>jackson-jaxrs-base</artifactId>
-      <version>${jackson.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.resteasy</groupId>
-      <artifactId>resteasy-jaxrs</artifactId>
-      <version>${resteasy.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.resteasy</groupId>
-      <artifactId>resteasy-multipart-provider</artifactId>
-      <version>${resteasy.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.resteasy</groupId>
-      <artifactId>resteasy-jackson2-provider</artifactId>
-      <version>${resteasy.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.resteasy</groupId>
-      <artifactId>resteasy-jaxb-provider</artifactId>
-      <version>${resteasy.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.resteasy</groupId>
-      <artifactId>resteasy-client</artifactId>
-      <version>${resteasy.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>io.github.resilience4j</groupId>
-      <artifactId>resilience4j-retry</artifactId>
-      <version>${resilience4jVersion}</version>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.wildfly.plugins</groupId>
-        <artifactId>wildfly-maven-plugin</artifactId>
-        <version>2.1.0</version>
-        <configuration>
-          <skip>false</skip>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <version>2.6</version>
-        <executions>
-          <execution>
-            <id>make-assembly</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <archive>
-                <manifest>
-                  <mainClass>${main.class}</mainClass>
-                </manifest>
-              </archive>
-              <descriptorRefs>
-                <descriptorRef>jar-with-dependencies</descriptorRef>
-              </descriptorRefs>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-</project>
\ No newline at end of file