Skip to content

Commit

Permalink
Merge pull request #12 from Vineflower/use-as-dep
Browse files Browse the repository at this point in the history
Add information about Vineflower maven publication
  • Loading branch information
zml2008 authored Aug 17, 2023
2 parents ba19435 + 8bddd07 commit 3aa950b
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 2 deletions.
1 change: 0 additions & 1 deletion source/_ext/vineflower_site_extensions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def setup(app: Sphinx):
app.add_role("java", highlight_role("java"))
app.connect("html-page-context", canonical_url)


_issue_regex = re.compile(r'[A-Z]+-[1-9][0-9]*')
_mojira_url = "https://bugs.mojang.com/browse/"

Expand Down
10 changes: 9 additions & 1 deletion source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,22 @@
# The full api version, including alpha/beta/rc tags
release = '1.9.2'

rst_prolog = f"""
.. |version| replace:: {release}
"""

myst_substitutions = {
'version': release
}

if release.endswith('-SNAPSHOT'):
tags.add('draft')

if 'GITHUB_REF' in os.environ:
ref = os.environ['GITHUB_REF']
if ref.startswith("refs/pull/"):
pr_number = ref[len("refs/pull/"):-len("/merge")]
rst_prolog = f"""
rst_prolog += f"""
.. caution::
This version of the Vineflower site has been built as a preview of pull request :github:`vineflower-site#{pr_number}`, and has not been reviewed.
Expand Down
85 changes: 85 additions & 0 deletions source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,91 @@ Downloads

The primary mode of distribution for Vineflower is the jar, which can be found on the `releases page <https://github.com/Vineflower/vineflower/releases>`_ on GitHub, which can also found on maven. There is also an `Intellij Plugin <https://plugins.jetbrains.com/plugin/18032-quiltflower>`_ for use.

Running Vineflower requires a Java 11 or newer JVM, though classpath context can be loaded from any other JVM using the ``-jrt`` CLI parameter.

Vineflower is published on Maven Central, and can be accessed from build scripts like so:

.. tab-set::

.. tab-item:: Maven
:sync: maven

.. code-block:: xml
:substitutions:
<dependency>
<groupId>org.vineflower</groupId>
<artifactId>vineflower</artifactId>
<version>|version|</version>
</dependency>
.. tab-item:: Gradle (Groovy)
:sync: gradle-groovy

.. code-block:: groovy
:substitutions:
repositories {
mavenCentral()
}
dependencies {
implementation "org.vineflower:vineflower:|version|"
}
.. tab-item:: Gradle (Kotlin)
:sync: gradle-kotlin

.. code-block:: kotlin
:substitutions:
repositories {
mavenCentral()
}
dependencies {
implementation("org.vineflower:vineflower:|version|")
}
Development (``-SNAPSHOT``) builds are published on the Sonatype OSS snapshots repository as well for testing purposes:

.. tab-set::

.. tab-item:: Maven
:sync: maven

.. code:: xml
<repositories>
<repository>
<id>sonatype-oss-snapshots1</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
</repositories>
.. tab-item:: Gradle (Groovy)
:sync: gradle-groovy

.. code:: groovy
repositories {
maven {
name = "sonatype-oss-snapshots1"
url = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
}
}
.. tab-item:: Gradle (Kotlin)
:sync: gradle-kotlin

.. code:: kotlin
repositories {
maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots/") {
name = "sonatype-oss-snapshots"
}
}
Socials
=========
Expand Down

0 comments on commit 3aa950b

Please sign in to comment.