diff --git a/2.0 Roadmap.md b/2.0 Roadmap.md index 7d0e27a..2f339ce 100644 --- a/2.0 Roadmap.md +++ b/2.0 Roadmap.md @@ -4,7 +4,7 @@ * [ ] Rework action to get username * [ ] Fix SUL for BotPasswords * [ ] Add more examples/cheatsheet -* [ ] Get on Maven Central +* [x] Get on Maven Central * [ ] Add a real logger (Flogger?) * [ ] POST large getNoPropCont * [ ] Get on JSON fmt 2 \ No newline at end of file diff --git a/README.md b/README.md index c44c1b6..6cd75a3 100644 --- a/README.md +++ b/README.md @@ -13,27 +13,26 @@ It's so easy that _anyone_ (including your grandma 👵🏻) can write a program Not convinced? Try out the [examples](https://github.com/fastily/jwiki/wiki/Examples). ## Download -jwiki is [on jcenter](https://bintray.com/fastily/maven/jwiki). - #### Maven ```xml - fastily + org.fastily jwiki - 1.7.0 - pom + 1.8.0 ``` #### Gradle ```groovy -compile 'fastily:jwiki:1.7.0' +implementation 'org.fastily:jwiki:1.8.0' ``` +⚠️ ATTENTION: COORDINATES HAVE CHANGED (since 1.7.0)! jwiki's new groupId is `org.fastily` + ## Build -Build and publish jwiki on your local machine with +Build and publish (install) jwiki on your computer with ```bash -./gradlew build publishToMavenLocal +./gradlew publishToMavenLocal ``` ## Resources diff --git a/build.gradle b/build.gradle index e0d7674..8b6a843 100644 --- a/build.gradle +++ b/build.gradle @@ -1,21 +1,20 @@ plugins { - id 'java-library' - id 'maven-publish' id 'eclipse' id 'idea' + id 'java-library' + id 'maven-publish' + id 'signing' } -version="1.7.1" description="${project.name} build script" -group="fastily" - -sourceCompatibility = JavaVersion.VERSION_11 -targetCompatibility = JavaVersion.VERSION_11 +group="org.fastily" +version="1.8.0" repositories { - jcenter() + mavenCentral() } + dependencies { api "com.google.code.gson:gson:2.8.6" api "com.squareup.okhttp3:okhttp:4.5.0" @@ -27,11 +26,21 @@ dependencies { testImplementation 'com.squareup.okhttp3:mockwebserver:4.5.0' } + test { useJUnitPlatform() } +java { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + + withJavadocJar() + withSourcesJar() +} + + javadoc { source = sourceSets.main.allJava classpath = configurations.compileClasspath @@ -56,11 +65,13 @@ task sourceJar(type: Jar) { classifier = 'sources' } + task packageJavadoc(type: Jar) { from javadoc classifier = 'javadoc' } + wrapper { gradleVersion = '6.3' } @@ -68,25 +79,49 @@ wrapper { publishing { publications { - mavenPublish(MavenPublication) { + mavenJava(MavenPublication) { from components.java - artifact sourceJar - artifact packageJavadoc - pom { name = 'jwiki' - description = 'A library for effortlessly interacting with Wikipedia/MediaWiki.' + description = 'A library for effortlessly interacting with Wikipedia/MediaWiki' inceptionYear = '2014' url = 'https://github.com/fastily/jwiki' licenses { license { name = 'GNU General Public License, Version 3.0' url = 'https://www.gnu.org/licenses/gpl-3.0.txt' - distribution = 'repo' } } + developers { + developer { + id = 'fastily' + name = 'Fastily' + email = 'fastily@users.noreply.github.com' + } + } + scm { + connection = 'scm:git:https://github.com/fastily/jwiki.git' + developerConnection = 'scm:git:ssh://github.com/fastily/jwiki.git' + url = 'https://github.com/fastily/jwiki' + } + } + } + } + + repositories { + maven { + url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" + + credentials { + username "$ossrhUsername" + password "$ossrhPassword" } } } +} + + +signing { + sign publishing.publications.mavenJava } \ No newline at end of file