Code Monkey home page Code Monkey logo

j2sdl's Introduction

j2sdl (Java-to-SDL)

j2sdl is a complete mapping of SDL2 APIs to Java, including extension libs such as SDL_mixer, SDL_image, etc.

Usage

Gradle

Add platform dependency to j2sdl-bom, followed by other required sdl2 components, for example:

dependencies {
    implementation(platform('com.github.carlwilk32:j2sdl-bom:1.0-SNAPSHOT'))
    implementation 'com.github.carlwilk32:j2sdl-core'
    implementation 'com.github.carlwilk32:j2sdl-image'
    implementation 'com.github.carlwilk32:j2sdl-mixer'
}

Provide definition for GitHub Package Repository (GPR) within your build script:

repositories {
    ...
    maven { url 'https://ktor-github-package-registry-proxy.fly.dev' }
}

this is a custom proxy that simply redirects all the requests to GPR with Authorization header provided by default.

Q: "Why use proxy? Can't I access GPR directly?"

A: yes, you can, but...

GitHub doesn't allow anonymous read for public packages; therefore You have to issue your own Personal Access Token (PAT) and provide their repo as follows

repositories {
    mavenCentral()
    maven {
        url = uri('https://maven.pkg.github.com/carlwilk32/*')
        credentials {
            username = 'YOUR_NAME'
            password = 'YOUR_TOKEN'
        }
    }
}

This is quite annoying and barely usable approach, but there are no official solution yet.

Maven

For Maven you need to declare dependency management separately as follows

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.github.carlwilk32</groupId>
            <artifactId>j2sdl-bom</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
    </dependencies>
</dependencyManagement>

And then declare required dependencies, for example:

<dependencies>
    <dependency>
        <groupId>com.github.carlwilk32</groupId>
        <artifactId>j2sdl-core</artifactId>
    </dependency>
    <dependency>
        <groupId>com.github.carlwilk32</groupId>
        <artifactId>j2sdl-image</artifactId>
    </dependency>
</dependencies>

Additionally, you will need to provide definition for new repo to your settings.xml, for more details refere to official guide here.

Publish

This project is configured to publish all libraries to the GitHub Package Registry. To do so run

./gradlew publish

if you need to publish only specific version than you can provide a fully qualified name, like

./gradlew :j2sdl-core:publish

More details

Read library specific README to get further details:

j2sdl's People

Contributors

shinedeveloper avatar carlwilk32 avatar otopetrik avatar philosoph228 avatar karlstrings avatar

Stargazers

 avatar kindred77 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.