Skip to content

Commit

Permalink
Merge pull request #27 from HeroCC/ide-tweaks
Browse files Browse the repository at this point in the history
IDE & Build System Tweaks
  • Loading branch information
HeroCC authored Jul 26, 2023
2 parents a58c612 + 4b5a62c commit 0e1a1f9
Show file tree
Hide file tree
Showing 10 changed files with 364 additions and 236 deletions.
17 changes: 0 additions & 17 deletions .circleci/config.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/java
{
"name": "Java",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/java:1-17-bullseye",

"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "none",
"installMaven": "false",
"installGradle": "false"
},
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"moby": true,
"azureDnsAutoDetection": true,
"installDockerBuildx": true,
"version": "latest",
"dockerDashComposeVersion": "none"
},
"ghcr.io/devcontainers-contrib/features/act:1": {
"version": "latest"
},
"ghcr.io/devcontainers-contrib/features/yamllint:2": {
"version": "latest"
}
},

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"vscjava.vscode-java-pack",
"vscjava.vscode-gradle",
"redhat.vscode-yaml"
]
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "java -version",

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Java CI

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build test

- name: Upload build jars
uses: actions/upload-artifact@v3
with:
name: jars
path: build/libs/
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"vscjava.vscode-gradle",
"redhat.vscode-yaml"
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "automatic"
}
15 changes: 10 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '6.0.0'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}

String packagePath = 'org.minecast.bedhome'
group packagePath
version = '2.34'

sourceCompatibility = 1.8
targetCompatibility = 1.8
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

repositories {
mavenCentral()
maven { url "https://hub.spigotmc.org/nexus/content/groups/public" }
//maven { url "http://repo.gravitydevelopment.net" }
maven { url "http://nexus.hc.to/content/repositories/pub_releases" }
maven { url "https://nexus.hc.to/content/repositories/pub_releases" }
maven { url "https://jitpack.io" }
maven { url 'https://repo.codemc.org/repository/maven-public' }
maven { url 'https://papermc.io/repo/repository/maven-public/'}
Expand Down Expand Up @@ -66,4 +68,7 @@ processResources {
filter org.apache.tools.ant.filters.ReplaceTokens, tokens: resourceTokens
}


tasks.named('wrapper') {
distributionType = Wrapper.DistributionType.BIN
gradleVersion = '8.2'
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 0e1a1f9

Please sign in to comment.