-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Overhaul the structure, bump the version to 0.1.0-SNAPSHOT
- Loading branch information
1 parent
0fe05e9
commit db7ecf3
Showing
18 changed files
with
190 additions
and
169 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,47 @@ | ||
name: build | ||
on: push | ||
jobs: | ||
build: | ||
name: build | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up JDK 14 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: '14' | ||
- name: Build with Gradle | ||
run: ./gradlew build | ||
- name: Upload Actions Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: artifacts | ||
path: build/libs/ | ||
- name: Get Tag Name | ||
uses: olegtarasov/get-tag@v2 | ||
id: tag_name | ||
- name: Publish to Bintray | ||
if: ${{ startsWith(steps.tag_name.outputs.tag, 'v') }} | ||
run: ./gradlew bintrayUpload | ||
env: | ||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | ||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
BINTRAY_USER: ${{ secrets.BINTRAY_USER }} | ||
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }} | ||
- name: Create Release | ||
if: ${{ startsWith(steps.tag_name.outputs.tag, 'v') }} | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.tag_name.outputs.tag }} | ||
release_name: ${{ steps.tag_name.outputs.tag }} | ||
prerelease: ${{ contains(github.ref, '-') }} | ||
- name: Upload Release Asset | ||
if: ${{ startsWith(steps.tag_name.outputs.tag, 'v') }} | ||
uses: AButler/[email protected] | ||
with: | ||
files: build/libs/* | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
release-tag: ${{ steps.tag_name.outputs.tag }} |
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 |
---|---|---|
@@ -1,25 +1,21 @@ | ||
plugins { | ||
`java-library` | ||
kotlin("jvm") version "1.4.0" | ||
`java-library` | ||
`maven-publish` | ||
signing | ||
id("com.jfrog.bintray") version "1.8.5" | ||
} | ||
|
||
group = "me.finalchild" | ||
version = "0.0.1-SNAPSHOT" | ||
|
||
description = "Kotlin object is plugin object." | ||
version = "0.1.0-SNAPSHOT" | ||
description = "kotlinc plugin for kopo" | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation(kotlin("stdlib")) | ||
implementation(group="org.jetbrains.kotlin", name="kotlin-compiler-embeddable") | ||
} | ||
|
||
tasks.withType<JavaCompile>().configureEach { | ||
options.encoding = "UTF-8" | ||
api(group="org.jetbrains.kotlin", name="kotlin-compiler-embeddable") | ||
} | ||
|
||
java { | ||
|
@@ -28,46 +24,104 @@ java { | |
modularity.inferModulePath.set(true) | ||
withSourcesJar() | ||
} | ||
|
||
tasks.compileJava { | ||
inputs.property("moduleName", "me.finalchild.kopo") | ||
dependsOn(tasks.compileKotlin) | ||
inputs.property("moduleName", "me.finalchild.kopo.kotlinc") | ||
options.encoding = "UTF-8" | ||
destinationDir = tasks.compileKotlin.get().destinationDir | ||
doFirst { | ||
options.compilerArgs = listOf("--module-path", classpath.asPath) | ||
classpath = files() | ||
} | ||
destinationDir = tasks.compileKotlin.get().destinationDir | ||
} | ||
|
||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach { | ||
tasks.compileKotlin { | ||
kotlinOptions { | ||
freeCompilerArgs = listOf("-progressive") | ||
jvmTarget = "13" | ||
jvmTarget = "14" | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("maven") { | ||
from(components["kotlin"]) | ||
artifact(tasks["sourcesJar"]) | ||
|
||
pom { | ||
name.set(project.name) | ||
description.set(project.description) | ||
url.set("https://github.com/finalchild/kopo-kotlinc") | ||
inceptionYear.set("2020") | ||
url.set("https://github.com/finalchild/kopo") | ||
|
||
|
||
organization { | ||
name.set("Our Minecraft Space") | ||
url.set("https://ourmc.space/") | ||
} | ||
licenses { | ||
license { | ||
name.set("ISC License") | ||
url.set("https://opensource.org/licenses/isc-license.txt") | ||
distribution.set("repo") | ||
} | ||
} | ||
developers { | ||
developer { | ||
id.set("finalchild") | ||
name.set("Final Child") | ||
email.set("[email protected]") | ||
url.set("https://github.com/finalchild") | ||
organization.set("Our Minecraft Space") | ||
organizationUrl.set("https://github.com/Our-Minecraft-Space") | ||
roles.set(setOf("developer")) | ||
timezone.set("Asia/Seoul") | ||
} | ||
} | ||
scm { | ||
connection.set("scm:git:https://github.com/finalchild/kopo-kotlinc.git") | ||
developerConnection.set("scm:git:https://github.com/finalchild/kopo-kotlinc.git") | ||
tag.set(if (!(project.version as String).endsWith("-SNAPSHOT")) { | ||
"v${project.version}" | ||
} else { | ||
"HEAD" | ||
}) | ||
url.set("https://github.com/finalchild/kopo-kotlinc") | ||
} | ||
issueManagement { | ||
system.set("GitHub") | ||
url.set("https://github.com/finalchild/kopo-kotlinc/issues") | ||
} | ||
ciManagement { | ||
system.set("GitHub Actions") | ||
url.set("https://github.com/finalchild/kopo-kotlinc/actions") | ||
} | ||
distributionManagement { | ||
downloadUrl.set("https://github.com/fnialchild/kopo-kotlinc/releases") | ||
} | ||
} | ||
} | ||
} | ||
repositories { | ||
maven { | ||
name = "heartpattern-repo" | ||
url = if (project.version.toString().endsWith("-SNAPSHOT")) { | ||
uri("https://maven.heartpattern.io/repository/finalchild-snapshots/") | ||
} | ||
|
||
signing { | ||
useInMemoryPgpKeys(System.getenv("SIGNING_KEY"), System.getenv("SIGNING_PASSWORD")) | ||
sign(publishing.publications["maven"]) | ||
} | ||
|
||
bintray { | ||
user = System.getenv("BINTRAY_USER") | ||
key = System.getenv("BINTRAY_KEY") | ||
setPublications("maven") | ||
publish = true | ||
pkg.run { | ||
repo = "Final_Repo" | ||
name = project.name | ||
version.run { | ||
name = project.version as String | ||
vcsTag = if (!(project.version as String).endsWith("-SNAPSHOT")) { | ||
"v${project.version}" | ||
} else { | ||
uri("https://maven.heartpattern.io/repository/finalchild-releases/") | ||
} | ||
credentials { | ||
username = project.findProperty("repo-username") as? String ?: System.getenv("REPO_USERNAME") | ||
password = project.findProperty("repo-password") as? String? ?: System.getenv("REPO_PASSWORD") | ||
null | ||
} | ||
} | ||
} | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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
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
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
rootProject.name = "kopo" | ||
rootProject.name = "kopo-kotlinc" | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module me.finalchild.kopo { | ||
module me.finalchild.kopo.kotlinc { | ||
requires kotlin.stdlib; | ||
requires kotlin.compiler.embeddable; | ||
|
||
exports me.finalchild.kopo; | ||
exports me.finalchild.kopo.kotlinc; | ||
} |
36 changes: 0 additions & 36 deletions
36
src/main/kotlin/me/finalchild/kopo/ClassBuilderClassVisitor.kt
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
src/main/kotlin/me/finalchild/kopo/KopoClassGenerationInterceptor.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.