Skip to content

Contribution

Distractic edited this page Feb 21, 2023 · 3 revisions

Firstly, you should modify the version of the project in gradle.properties file by changing the version property.

If you want to modify the API locally and use it in your project, you need to publish it in a local repository with the following command:

gradlew publishToMavenLocal

Use your new version

When the publication is done, you can use the API in your project using the following configuration :

Replace {version} by the version in the gradle.properties file used during publish.

Gradle (groovy)

repositories {
    mavenLocal()
}

dependencies {
    api("com.github.Rushyverse:api:{version}")
}

Gradle (kotlin)

repositories {
    mavenLocal()
}

dependencies {
    api("com.github.Rushyverse:api:{version}")
}

Maven

<project>
    <repositories>
        <repository>
            <id>mavenLocal</id>
            <url>file://${user.home}/.m2/repository</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>com.github.Rushyverse</groupId>
            <artifactId>api</artifactId>
            <version>{version}</version>
        </dependency>
    </dependencies>
</project>

Build

To build the project, you need to use the gradle app (gradlew.bat for windows and gradlew for linux). gradlew is a wrapper to run the gradle command without installing it on our computer.

gradlew build

The jar will be created in the build/libs folder.

Test

The code is tested using JUnit and can be executed using the following command:

gradlew test
Clone this wiki locally