Skip to content

Commit

Permalink
modernize gradle build, release 1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fastily committed Apr 15, 2020
1 parent 691a5e9 commit 3c4898b
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 23 deletions.
2 changes: 1 addition & 1 deletion 2.0 Roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<dependency>
<groupId>fastily</groupId>
<groupId>org.fastily</groupId>
<artifactId>jwiki</artifactId>
<version>1.7.0</version>
<type>pom</type>
<version>1.8.0</version>
</dependency>
```

#### 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
Expand Down
63 changes: 49 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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
Expand All @@ -56,37 +65,63 @@ task sourceJar(type: Jar) {
classifier = 'sources'
}


task packageJavadoc(type: Jar) {
from javadoc
classifier = 'javadoc'
}


wrapper {
gradleVersion = '6.3'
}


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 = '[email protected]'
}
}
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
}

0 comments on commit 3c4898b

Please sign in to comment.