diff --git a/Dockerfile b/Dockerfile index 07121be..ad4e608 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,8 @@ ARG BUILD_HOME ENV APP_HOME=$BUILD_HOME/bot WORKDIR $APP_HOME # Copy gradle settings and config to /app in the image -COPY build.gradle settings.gradle $APP_HOME +COPY build.gradle $APP_HOME +COPY settings.gradle $APP_HOME # Build gradle - caches dependencies RUN gradle --no-daemon build || return 0 @@ -25,7 +26,8 @@ ENV APP_HOME=$BUILD_HOME/bot WORKDIR $APP_HOME COPY --from=cache /root/.gradle /root/.gradle -COPY --from=cache $APP_HOME/build.gradle $APP_HOME/settings.gradle $APP_HOME +COPY --from=cache $APP_HOME/build.gradle $APP_HOME +COPY --from=cache $APP_HOME/settings.gradle $APP_HOME COPY src/ src/ RUN gradle --no-daemon -b build.gradle clean build diff --git a/Makefile b/Makefile deleted file mode 100644 index f824c85..0000000 --- a/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -build-bot: - docker build -t bot-image -f Dockerfile.dev . - -run-bot: - docker run -e DISPLAY=host.docker.internal:0 --name bot -it --rm bot-image \ No newline at end of file diff --git a/build-CI.gradle b/build-CI.gradle deleted file mode 100644 index e9afbde..0000000 --- a/build-CI.gradle +++ /dev/null @@ -1,77 +0,0 @@ -plugins { - id 'java' - id 'maven-publish' -} - -group = 'com.github.OSRSB' - -allprojects { - repositories { - mavenLocal() - maven { url 'https://repo.runelite.net' } - maven { url 'https://jitpack.io' } - mavenCentral() - } -} - -sourceSets { - main { - java { - srcDirs= ["src/main/java"] - } - } -} - -jar { - configurations.implementation.setCanBeResolved(true) - from { - configurations.implementation.filter {it.name.startsWith('Dax')}.collect {zipTree(it)} - } - - exclude 'META-INF/*.RSA' - exclude 'META-INF/*.SF' - exclude 'META-INF/*.DSA' - - duplicatesStrategy = DuplicatesStrategy.EXCLUDE -} - -def runeLiteVersion = getRuneLiteVersion() - -static def getRuneLiteVersion() { - URL url = new URL("http://repo.runelite.net/net/runelite/client/maven-metadata.xml") - URLConnection urlConnection = url.openConnection() - BufferedReader bufferedReader = new BufferedReader(new InputStreamReader( - urlConnection.getInputStream())) - String latestName = null - String inputLine - while ((inputLine = bufferedReader.readLine()) != null) { - inputLine = inputLine.trim() - if (inputLine.contains("")) { - latestName = inputLine.replace("", "").replace("", "") - } - } - bufferedReader.close() - return latestName -} - -dependencies { - compileOnly 'org.projectlombok:lombok:1.18.22' - annotationProcessor 'org.projectlombok:lombok:1.18.22' - - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.slf4j:slf4j-simple:1.7.36' - - implementation group: 'net.sf.jopt-simple', name:'jopt-simple', version: '5.0.4' - - compileOnly group: 'net.runelite', name:'client', version: runeLiteVersion - - testImplementation group: 'net.runelite', name:'client', version: runeLiteVersion - testImplementation group: 'net.runelite', name:'jshell', version: runeLiteVersion - - implementation 'com.github.OSRSB:OsrsBot:master-SNAPSHOT' - implementation 'com.github.OSRSB:DaxWalkerOSRSBot:master-SNAPSHOT' -} - -tasks.withType(JavaCompile) { - options.encoding = 'UTF-8' -} diff --git a/build.gradle b/build.gradle index 7c3167b..cb215d0 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ repositories { mavenCentral() } -def lastSupportedVersion = "1.10.32.1" +def lastSupportedVersion = "1.10.35" def runeLiteVersion = getRuneLiteVersion() def supportedCheck = false if (supportedCheck) { diff --git a/docker-compose-wireguard.yml b/docker-compose-wireguard.yml deleted file mode 100644 index 8021239..0000000 --- a/docker-compose-wireguard.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -version: "2.1" -services: - wireguard: - image: lscr.io/linuxserver/wireguard:latest - container_name: wireguard - cap_add: - - NET_ADMIN - - SYS_MODULE - environment: - - PUID=1000 - - PGID=1000 - - TZ=America/New_York - volumes: - - /path/to/wireguard/config:/config # Set to your local config - - /lib/modules:/lib/modules - ports: - - 8080:8080 - sysctls: - - net.ipv4.conf.all.src_valid_mark=1 - restart: unless-stopped - script: - image: bot-image - build: - dockerfile: Dockerfile - container_name: bot - network_mode: service:wireguard - environment: - - DISPLAY=host.docker.internal:0 - restart: unless-stopped \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index b5dca93..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -version: "2.1" -services: - script: - image: bot-image - build: - dockerfile: Dockerfile - container_name: bot - environment: - - DISPLAY=host.docker.internal:0 - restart: unless-stopped \ No newline at end of file