-
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 6027fd1
Showing
12 changed files
with
614 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,31 @@ | ||
name: Build annotation | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'zulu' | ||
cache: 'gradle' | ||
|
||
- name : Build and Publish API with Gradle | ||
run: | | ||
echo "::group::Build annotation" | ||
./gradlew build | ||
echo "::endgroup::" | ||
echo "::group::Publish annotation to Maven Repository" | ||
./gradlew publishAllPublicationsToMavenRepository | ||
echo "::endgroup::" | ||
env: | ||
DEPLOY_ID: ${{ secrets.DEPLOY_ID }} | ||
DEPLOY_PW: ${{ secrets.DEPLOY_PW }} |
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,118 @@ | ||
# User-specific stuff | ||
.idea/ | ||
|
||
*.iml | ||
*.ipr | ||
*.iws | ||
|
||
# IntelliJ | ||
out/ | ||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# JIRA plugin | ||
atlassian-ide-plugin.xml | ||
|
||
# Compiled class file | ||
*.class | ||
|
||
# Log file | ||
*.log | ||
|
||
# BlueJ files | ||
*.ctxt | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.nar | ||
*.ear | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
|
||
*~ | ||
|
||
# temporary files which can be created if a process still has a handle open of a deleted file | ||
.fuse_hidden* | ||
|
||
# KDE directory preferences | ||
.directory | ||
|
||
# Linux trash folder which might appear on any partition or disk | ||
.Trash-* | ||
|
||
# .nfs files are created when an open file is removed but is still being accessed | ||
.nfs* | ||
|
||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
# Windows thumbnail cache files | ||
Thumbs.db | ||
Thumbs.db:encryptable | ||
ehthumbs.db | ||
ehthumbs_vista.db | ||
|
||
# Dump file | ||
*.stackdump | ||
|
||
# Folder config file | ||
[Dd]esktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Windows Installer files | ||
*.cab | ||
*.msi | ||
*.msix | ||
*.msm | ||
*.msp | ||
|
||
# Windows shortcuts | ||
*.lnk | ||
|
||
.gradle | ||
build/ | ||
|
||
# Ignore Gradle GUI config | ||
gradle-app.setting | ||
|
||
# Cache of project | ||
.gradletasknamecache | ||
|
||
**/build/ | ||
|
||
# Common working directory | ||
run/ | ||
|
||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) | ||
!gradle-wrapper.jar |
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 @@ | ||
## annotation | ||
|
||
Basic annotations for caramel.moe Network |
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,60 @@ | ||
import java.util.* | ||
|
||
plugins { | ||
id("java") | ||
id("maven-publish") | ||
} | ||
|
||
group = "moe.caramel" | ||
version = "1.0-SNAPSHOT" | ||
|
||
val javaVersion = 17 | ||
java { | ||
toolchain { | ||
languageVersion.set(JavaLanguageVersion.of(javaVersion)) | ||
} | ||
withSourcesJar() | ||
withJavadocJar() | ||
} | ||
|
||
/* Dependencies */ | ||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation("javax.annotation", "javax.annotation-api", "1.3.2") | ||
implementation("org.jetbrains", "annotations", "24.1.0") | ||
} | ||
|
||
/* Tasks */ | ||
tasks { | ||
compileJava { | ||
options.encoding = "UTF-8" | ||
options.release.set(javaVersion) | ||
} | ||
javadoc { | ||
options.encoding = Charsets.UTF_8.name() | ||
} | ||
processResources { | ||
filteringCharset = Charsets.UTF_8.name() | ||
} | ||
} | ||
|
||
/* Publish */ | ||
val isSnapshot = project.version.toString().endsWith("-SNAPSHOT") | ||
configure<PublishingExtension> { | ||
repositories.maven { | ||
name = "maven" | ||
url = uri("https://repo.caramel.moe/repository/maven-" + (if (isSnapshot) "snapshots" else "releases") + "/") | ||
credentials { | ||
username = System.getenv("DEPLOY_ID") | ||
password = System.getenv("DEPLOY_PW") | ||
} | ||
} | ||
|
||
publications.create<MavenPublication>("maven") { | ||
artifactId = project.name.lowercase(Locale.ENGLISH) | ||
from(components["java"]) | ||
} | ||
} |
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,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.