Skip to content

Commit

Permalink
Try publication to Github
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanxD committed Aug 13, 2021
1 parent 907c08b commit b888939
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 2 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle

name: Gradle Package

on:
release:
types: [created]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v2
- name: Set up JDK 16
uses: actions/setup-java@v2
with:
java-version: '16'
distribution: 'zulu'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Gradle
run: gradle build

# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
# the publishing section of your build.gradle
- name: Publish to GitHub Packages
run: gradle publish
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 14 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[book]
authors = ["JonathanxD", "FireflyLang"]
language = "en"
multilingual = false
src = "book/src"
title = "Kores Framework Book"

[build]
build-dir = "book-build"

[output.html]
mathjax-support = true
default-theme = "navy"
edit-url-template = "https://github.com/koresframework/Kores/edit/main/book/{path}"
2 changes: 2 additions & 0 deletions book/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Kores Framework
- [What is](What-is.md)
24 changes: 24 additions & 0 deletions book/src/What-is.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# What is

Kores Framework (named as CodeAPI earlier) is a library that provides AST ([Abstract Syntax Tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree)) for Java and JVM classes and modules. With Kores AST Definitions you can produce **Java Source Code** using [**Kores-SourceWriter**](https://github.com/koresframework/Kores-SourceWriter) transpiler and **JVM Bytecode** using [**Kores-BytecodeWriter**](https://github.com/koresframework/Kores-BytecodeWriter) compiler.

## Why?

Initially, Kores was a toy project to learn JVM Bytecode and create a common structure for compile-time and runtime code generation, focused on **Annotation Processors**. Later, Kores evolved to more likely a JVM Bytecode compiler ecosystem, more focused on **JVM Bytecode Generation** than in **Java Source Generation**.

Kores bytecode generation module tries to generate bytecode as close as possible to **javac**, with some exceptions, like [**not generating inner class definition for every used inner class**](https://stackoverflow.com/a/48603069) as specified in second paragraph of [JVMS 4.7.6](https://docs.oracle.com/javase/specs/jvms/se16/html/jvms-4.html#jvms-4.7.6). There is likely no popular JVM Implementation that does check for this (or no one of them check at all) or use this kind of information for something in fact, this is only a specification that is followed by **javac**.

## Projects that uses Kores


- [EventSys](https://github.com/ProjectSandstone/EventSys)
- A dynamic property base event system written on top of Kores

- [CodeProxy](https://github.com/JonathanxD/CodeProxy)
- A Proxy generator written on top of Kores, the key difference between Java proxies is that CodeProxies can extend classes.

- [AdapterHelper](https://github.com/JonathanxD/AdapterHelper)
- A set of utilities to help with creation, registration and management of Adapters, some features requires Kores, such as deep instance adapting.

- [FireflyLang Compiler](https://github.com/FireflyLang/firefly-compiler)
- A proof-of-concept language that implements type-reification, traits, rules, and so on.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ buildscript {
}

group 'com.github.jonathanxd'
version '4.1.2.base'
version '4.1.3.base'

apply from: 'gradle/common.gradle'
11 changes: 10 additions & 1 deletion gradle/common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,18 @@ license {

publishing {
repositories {
maven {
/*maven {
name = "Local"
// change to point to your repo, e.g. http://my.org/repo
url = "$buildDir/repo"
}*/
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/koresframework/Kores"
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
publications {
Expand Down

0 comments on commit b888939

Please sign in to comment.