-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5692dba
Showing
20 changed files
with
1,194 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# This workflow will build a Java project with Gradle | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | ||
|
||
name: Testing CI with Gradle | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
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: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build with Gradle | ||
run: ./gradlew clean checkLicenses build | ||
|
||
# This workflow will build a Java project with Gradle | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | ||
|
||
name: Build | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'gradle/**' | ||
- 'src/**' | ||
- 'build.gradle.kts' | ||
- 'settings.gradle.kts' | ||
- 'gradlew' | ||
- 'gradlew.bat' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.commits[0].message, '[no-build]')" | ||
steps: | ||
- uses: "actions/checkout@v3.1.0" | ||
- uses: "gradle/wrapper-validation-action@v1.0.5" | ||
- name: Set up JDK | ||
uses: "actions/setup-java@v3.9.0" | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
cache: gradle | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Test with Gradle | ||
run: ./gradlew test | ||
- name: Build jar with Gradle | ||
run: ./gradlew build | ||
- name: Upload artifacts | ||
uses: "actions/upload-artifact@v3.1.1" | ||
with: | ||
name: Gradle Galaxy | ||
path: build/libs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# This workflow will build a Java project with Gradle | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | ||
|
||
name: Build [PR] | ||
on: | ||
pull_request: | ||
paths: | ||
- 'gradle/**' | ||
- 'src/**' | ||
- 'build.gradle.kts' | ||
- 'settings.gradle.kts' | ||
- 'gradlew' | ||
- 'gradlew.bat' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.commits[0].message, '[no-build]')" | ||
steps: | ||
- uses: "actions/checkout@v3.1.0" | ||
- uses: "gradle/wrapper-validation-action@v1.0.5" | ||
- name: Set up JDK | ||
uses: "actions/setup-java@v3.9.0" | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
cache: gradle | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Test with Gradle | ||
run: ./gradlew test | ||
- name: Build jar with Gradle | ||
run: ./gradlew build | ||
- name: Upload artifacts | ||
uses: "actions/upload-artifact@v3.1.1" | ||
with: | ||
name: Gradle Galaxy | ||
path: build/libs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Intellij | ||
.idea/ | ||
|
||
# Gradle | ||
.gradle/ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 srnyx | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Gradle Galaxy | ||
|
||
**WIP** A Gradle plugin to simplify the process of creating projects |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
plugins { | ||
`kotlin-dsl` | ||
`maven-publish` | ||
`java-gradle-plugin` | ||
kotlin("jvm") version "1.8.22" | ||
id("org.jetbrains.dokka") version "1.8.20" | ||
id("com.gradle.plugin-publish") version "1.2.0" | ||
} | ||
|
||
group = "xyz.srnyx" | ||
version = "1.0.0" | ||
val pluginDescription: String = "A Gradle plugin to simplify the process of creating projects" | ||
val vcs: String = "github.com/srnyx/${project.name}" | ||
|
||
tasks.withType<JavaCompile> { | ||
sourceCompatibility = "1.8" | ||
targetCompatibility = "1.8" | ||
options.encoding = "UTF-8" | ||
} | ||
|
||
tasks.withType<KotlinCompile> { | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
|
||
dependencies { | ||
implementation(gradleApi()) | ||
implementation(kotlin("stdlib-jdk8")) | ||
|
||
// Plugins | ||
compileOnly("io.github.gradle-nexus", "publish-plugin", "1.3.0") | ||
compileOnly("org.jetbrains.dokka", "dokka-gradle-plugin", "1.8.20") | ||
compileOnly("com.github.jengelman.gradle.plugins", "shadow", "6.1.0") | ||
compileOnly("org.jetbrains.kotlin", "kotlin-gradle-plugin", "1.8.22") | ||
} | ||
|
||
@Suppress("UnstableApiUsage") | ||
gradlePlugin { | ||
isAutomatedPublishing = true | ||
website.set("https://${vcs}") | ||
vcsUrl.set("https://${vcs}") | ||
plugins { | ||
create(project.name) { | ||
id = "${project.group}.${project.name}" | ||
implementationClass = "${project.group}.gradlegalaxy.GradleGalaxy" | ||
version = project.version | ||
displayName = "Gradle Galaxy Plugin" | ||
description = pluginDescription | ||
tags.set(listOf("srnyx", "minecraft", "spigot")) | ||
} | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("pluginMaven") { | ||
pom { | ||
name.set("Gradle Galaxy") | ||
description.set(pluginDescription) | ||
url.set("https://${vcs}") | ||
packaging = "jar" | ||
|
||
licenses { | ||
license { | ||
name.set("MIT License") | ||
url.set("https://opensource.org/licenses/MIT") | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id.set("srnyx") | ||
name.set("srnyx") | ||
email.set("contact@srnyx.com") | ||
url.set("https://srnyx.com") | ||
organization.set("Venox Network") | ||
organizationUrl.set("https://venox.network") | ||
timezone.set("America/New_York") | ||
} | ||
} | ||
|
||
scm { | ||
connection.set("scm:git:git://${vcs}git") | ||
developerConnection.set("scm:git:ssh://${vcs}.git") | ||
url.set("https://${vcs}") | ||
} | ||
} | ||
} | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip | ||
networkTimeout=10000 | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.