Repository software for Sponge plugins and Forge mods
Clone or download
Latest commit c955fbb Dec 10, 2018

README.md

Ore

Build Status Hydra

Repository software for Sponge plugins and Forge mods https://ore.spongepowered.org/

Ore is written in Scala using the Play framework.

Clone

The following steps will ensure your project is cloned properly.

  1. git clone https://github.com/SpongePowered/Ore.git
  2. cp scripts/pre-commit .git/hooks

Setup

After cloning Ore, the first thing you will want to do is create a new PostgreSQL database for the application to use. This is required in order for Ore to run. Learn more about PostgreSQL here.

After setting up a database, create a copy of conf/application.conf.template named conf/application.conf and configure the application. This file is in the .gitignore so it will not appear in your commits. In a typical development environment, most of the defaults will do except you must set application.fakeUser to true to disable authentication to the Sponge forums. In addition, the SSL certification authority of https://forums.spongepowered.org is not typically recognized by the JVM so you will either have to manually add the cert to your JVM or set discourse.api.enabled to false in the configuration file.

Running

Running Ore is relatively simple.

With SBT

  • Download and install the latest SBT version.
  • Execute sbt run in the project root.

With IntelliJ Community Edition

  • Install the Scala plugin.
  • Import the build.sbt file.
  • Create a new SBT Task run configuration. Enter run in the Tasks field.
  • Run it.

With IntelliJ Ultimate Edition:

  • Install the Scala plugin.
  • Import the build.sbt file.
  • Create a new Play 2 App run configuration.
  • Run it.

Using Hydra

Hydra is the world’s only parallel compiler for the Scala language. Its design goal is to take advantage of the many cores available in modern hardware to parallelize compilation of Scala sources. This gives us the possibility to achieve a much faster compile time. Triplequote has kindly provided us with some licenses. If you have a license and want to use Hydra, follow these steps:

  1. Create the file project/hydra.sbt

  2. Put in this content into the newly created file:

    credentials += Credentials("Artifactory Realm",
        "repo.triplequote.com",
        "<username>",
        "<password>")
    resolvers += Resolver.url("Triplequote Plugins Releases", url("https://repo.triplequote.com/artifactory/sbt-plugins-release/"))(Resolver.ivyStylePatterns)
    addSbtPlugin("com.triplequote" % "sbt-hydra" % "<version>")
    
    • The <username> and <password> placeholders have to be replaced with your credentials.
    • The <version> placeholder has to be replaced with the lastest version of sbt-hydra which can be obtained from the offical changelog.
  3. Open the sbt console and make use of the following command where <license key> is your personal hydra license key:

    hydraActivateLicense <license key>
    
  4. Go and start compiling!

Further instructions can be found at the official Hydra documentation.