Skip to content

Latest commit

 

History

History
94 lines (70 loc) · 3.26 KB

File metadata and controls

94 lines (70 loc) · 3.26 KB

norwegian-organization-number-validator

A simple validator for, validation a norwegian organization number

See brreg organisasjonsnummer for more info on how validation of a norwegian organization number is done

Build and test Validate Gradle Wrapper Build and publish artifact Maven Central

Technologies used

  • Kotlin
  • Gradle
  • JDK 21

Using the library

import

Gradle(kotlin)

implementation("io.github.MikAoJk:norwegian-organization-number-validator:2.0.1")

Use example

import io.github.mikaojk.validator.validNorwegianOrganizationNumber

val validOrganizationNumber = validNorwegianOrganizationNumber("810009152")
if (validOrganizationNumber) {
            println("Orgnumber is valid")
        } else {
            println("Orgnumber is invalid")
        }

Local development started

Prerequisites

Make sure you have the Java JDK 21 installed You can check which version you have installed using this command:

java -version

Running the application locally

Build and run tests

To build locally and run the integration tests you can simply run

./gradlew clean build

or on windows gradlew.bat clean build

Upgrading the gradle wrapper

Find the newest version of gradle here: https://gradle.org/releases/ Then run this command:

./gradlew wrapper --gradle-version $gradleVersjon

Manual publish

To publish you can simply run

./gradlew clean build

and then run

./gradlew publish

Publish of artifact

Artifact publish is done by GitHub Actions, and publish to Maven Central and GitHub Packages

This project uses semantic versioning and does NOT prefix tags or release titles with v i.e. use 1.2.3 instead of v1.2.3

see guide about how to relese:creating release github

👥 Contact

This project is maintained by CODEOWNERS

Questions and/or feature requests? Please create an issue

✏️ Contributing

To get started, please fork the repo and checkout a new branch. See more info in CONTRIBUTING.md