Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Ruby with Kotlin #338

Open
wants to merge 230 commits into
base: master
Choose a base branch
from
Open

Replace Ruby with Kotlin #338

wants to merge 230 commits into from

Conversation

garyttierney
Copy link
Contributor

@garyttierney garyttierney commented May 30, 2017

As discussed in #310 this pull request introduces a new Kotlin based plugin system as well as a much, much better plugin build system.

Major planned features:

  • Debugging support (with IntelliJ or Eclipse's step-through debugger for example)
  • Unit test support
  • Integration test framework
  • Full editor integration (auto-completion, error reporting, etc.)

For a more detailed explanation of what we get with kotlin and this new plugin system see the discussion in #310.

As well as the plugin system itself, there is a lot of plugins written in Ruby left to port. A list of these is below.

  • areas
  • bank
  • chat
    • privacy
    • private-messaging
  • cmd
    • animate
    • bank
    • item
    • lookup
    • messaging
    • npc
    • punishment
    • skill
    • teleport
  • consumables
  • dummy
  • emote-tab
  • entity
    • attributes
    • mob
      • extension
      • following
      • walk-to
    • spawning
  • location
    • al-kharid
    • edgeville
    • falador
    • lumbridge
    • varrock
  • logout
  • navigation
    • door
  • player-action
  • quest
  • run
  • shops
  • skill
    • fishing
    • herblore
    • mining
    • prayer
    • runecraft
  • util (now part of the api plugin)

Two pugins have been deselected from the kotlin port, and will be done at a later date - dialogue and the (non-combat) magic skill.

This doesn't include tests for the plugins - see #361.

Creates a new sourceset for server plugins to support IDE integration
with plugin code.  Additionally moves plugins to game/data/plugins and
contains some gradle related fixes (remove java plugin from root project
and fix exec task dependency).
Adds gradle tasks to build all plugin scripts under data/plugins with
the KotlinPluginCompiler implementation previously used for runtime code
generation.  In addition to .plugin.kts files, scripts can also declare
API code in .kt files which will also be included on the classpath and
made available to other plugins.
Adds separate build tasks for each plugin by auto-discovering plugin meta
files in the build script.  Each plugin will automatically have its
main sources and tests compiled, and then it's output added to the game
modules classpath.

This enables support for incremental compilation of scripts, as well as
unit testing using Gradle's test framework.
@garyttierney garyttierney added blocked Blocked on another issue kotlin needs-discussion The project maintainers request input from users ruby-to-kotlin Part of the port from ruby to kotlin labels May 30, 2017
@garyttierney garyttierney requested review from Major- and rmcmk May 30, 2017 21:18
@rmcmk
Copy link
Contributor

rmcmk commented May 31, 2017

During this conversion I think we should go through and fix any open plugin issues left over from Ruby (such as the bugs that have been found, etc)

@Promises
Copy link
Contributor

Could also add woodcutting, since it's just mining with a few different ids, I could do it myself as soon as mining is done.

@garyttierney
Copy link
Contributor Author

@ryleykimmel ACK

@Promises I'd rather we didn't add new work onto this already monolithic task. However, am happy to merge code into it as we go if people would like to take on plugin work themselves.

@Major-
Copy link
Member

Major- commented May 31, 2017

@Promises feel free to work on wc yourself and we'll offer code review + happily accept a pull request

@garyttierney util might not need to exist, need to think about what stuff to put in the (kotlin version of) bootstrap

@garyttierney
Copy link
Contributor Author

@Major- right. Probably some core things we want to create bindings for in the bootstrap. Some thoughts:

  • Scheduled tasks - currently only used for following - per-player scheduled task or action might work better
  • Message Listeners - already done
  • Event Listeners - todo
  • Attribute bindings - todo - I think the bootstrap should provide this since attributes are very "core" (we need to persist them).
  • Game entity lookups

@cubeee
Copy link
Contributor

cubeee commented Jun 1, 2017

I'll help convert some plugins today

Major- and others added 26 commits July 13, 2019 19:00
Prevent bytecode generation related test failures in tests that rely on
PowerMock by updating to PowerMock 2.
Bumps org.jetbrains.kotlin.jvm from 1.3.40 to 1.3.41.

Signed-off-by: dependabot-preview[bot] <[email protected]>
Bumps org.jmailen.kotlinter from 1.16.0 to 1.26.0.

Signed-off-by: dependabot-preview[bot] <[email protected]>
…n.kotlinter-1.26.0

Bump org.jmailen.kotlinter from 1.16.0 to 1.26.0
…ins.kotlin.jvm-1.3.41

Bump org.jetbrains.kotlin.jvm from 1.3.40 to 1.3.41
Bumps org.sonarqube from 2.6.2 to 2.7.1.

Signed-off-by: dependabot-preview[bot] <[email protected]>
…ube-2.7.1

Bump org.sonarqube from 2.6.2 to 2.7.1
@sonarcloud
Copy link

sonarcloud bot commented Feb 29, 2020

SonarCloud Quality Gate failed.

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 21 Code Smells

0.0% 0.0% Coverage
3.9% 3.9% Duplication

@sonarcloud
Copy link

sonarcloud bot commented May 21, 2020

SonarCloud Quality Gate failed.

Bug E 2 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 3 Security Hotspots to review)
Code Smell A 26 Code Smells

0.0% 0.0% Coverage
3.9% 3.9% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked on another issue kotlin ruby-to-kotlin Part of the port from ruby to kotlin
Projects
None yet
Development

Successfully merging this pull request may close these issues.