Skip to content

Latest commit

 

History

History
110 lines (75 loc) · 2.85 KB

File metadata and controls

110 lines (75 loc) · 2.85 KB

Private releases

Development versions of this library are delivered as both Maven packages and NPM packages in a private Gitlab Packages registry.

To use it, you will need to authenticate to Gitlab, using either:

Kotlin and Gradle

To setup authentication, add the token to your gradle properties file ~/.gradle/gradle.properties:

gitlabToken=<deployOrPersonalToken>

Then, in your project configuration build file build.gradle.kts:

  • Ensure mavenCentral() is listed in the repositories{} for usual packages.
  • Add Gitlab to repositories:
repositories {
    maven {
        url = uri("https://gitlab.inria.fr/api/v4/projects/18591/packages/maven")
        credentials(HttpHeaderCredentials::class) {
            // set to "Deploy-Token" here if appropriate
            name = "Private-Token"
            val gitlabToken: String by project
            value = gitlabToken
        }
        authentication {
            create<HttpHeaderAuthentication>("header")
        }
    }
}
  • Add the c-crdtlib Maven package as a dependency:
dependencies {
    implementation("concordant:c-crdtlib:x.y.z")
}

JavaScript/TypeScript and NPM

Associate @concordant scope with the private registry and setup authentication:

npm config set @concordant:registry "https://gitlab.inria.fr/api/v4/packages/npm/"
npm config set '//gitlab.inria.fr/api/v4/packages/npm/:_authToken' "<deployOrPersonalToken>"

Then install the package:

npm i @concordant/c-client

Build project

The build is managed by Gradle. Kotlin sources (code and tests) are compiled to JVM Bytecode and to Javascript as a Node.js package.

gradle assemble:

  • compiles code and tests to JVM Bytecode;
  • compiles code and tests to Javascript (Node.js package);
  • creates a TypeScript interface
  • assembles a NPM package

gradle allTests:

  • runs JVM test suite;
  • runs Node.js test suite in a server like manner;
  • a report containing all tests results can be found in the file build/reports/tests/allTests/index.html.

gradle build:

  • compiles code and test.

gradle pack:

  • pack the NPM package

gradle publish:

  • publish the Maven and NPM packages (requires authentication ; better use it via CI pipelines).

gradle dokkaHtml:

  • creates the documentation from code comments;
  • documentation is accessible at build/dokka/html/crdtlib/index.html. See gradle tasks for variants other than HTML.

gradle clean:

  • cleans the project.

gradle tasks:

  • show all available tasks with descriptions.