diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fdc68a9..642b708 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,7 +1,7 @@ name: Publish hjson-java releases on Maven on: release: - types: [published] + types: [created] jobs: publish: runs-on: ubuntu-latest diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d17f429..0000000 --- a/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -language: java -jdk: -- openjdk8 -- openjdk11 -env: - global: - secure: -script: -- gradle build -before_deploy: -- cd cli -- gradle zip -- mv build/zip/hjson.zip build/zip/hjson-${TRAVIS_TAG}.zip -- cd .. -deploy: - provider: releases - file: cli/build/zip/hjson-${TRAVIS_TAG}.zip - overwrite: true - skip_cleanup: true - on: - tags: true - jdk: oraclejdk8 - api-key: - secure: WB5LNxdwTPB1qn1/CKW9LkJ5R+LrXOK76vf5JdQsoYqGiu6YsxzDE4sedfJQvUOjl4lhlZkmGVeMjKXKyFIxcCwkfu5cRm8XqutoaRNc8s6ynHhkzhX2GNCTvZoUvF3Idvud6lacHSLn46buDlytOFMC7WzUWNvqrVZkP+XCkYo= diff --git a/build.gradle b/build.gradle index e986a49..63a6809 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,8 @@ -apply plugin: 'java' - -group = 'org.hjson' -description = """Hjson, the Human JSON.""" +plugins { + id 'java' + id 'maven-publish' + id 'signing' +} java { sourceCompatibility = JavaVersion.VERSION_1_8 @@ -55,4 +56,46 @@ task(testSuite, dependsOn: ['classes','testClasses'], type: JavaExec) { test.dependsOn testSuite -//apply from: 'gradle-mvn-push.gradle' +publishing { + publications { + maven(MavenPublication) { + from components.java + pom { + description = project.description + url = "https://github.com/hjson/hjson-java" + licenses { + license { + name = "The MIT License (MIT)" + url = "https://github.com/hjson/hjson-java/blob/master/LICENSE" + distribution = "repo" + } + } + developers { + developer { + id = "laktak" + name = "Christian Zangl" + } + } + scm { + connection = "scm:git@github.com:hjson/hjson-java.git" + developerConnection = "scm:git@github.com:hjson/hjson-java.git" + url = "https://github.com/hjson/hjson-java" + } + } + } + } + repositories { + maven { + name = "OSSRH" + url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" + credentials { + username = System.getenv("MAVEN_USERNAME") + password = System.getenv("MAVEN_PASSWORD") + } + } + } +} + +// signing { +// sign publishing.publications.maven +// } diff --git a/docs/allclasses-frame.html b/docs/allclasses-frame.html index a666f45..70a7f4d 100644 --- a/docs/allclasses-frame.html +++ b/docs/allclasses-frame.html @@ -3,7 +3,7 @@
-