Skip to content

Commit f38d17c

Browse files
authored
A bunch of maintenance to bring this up to date (#70)
* Replaced Kobalt with Gradle * Updated dependencies and fixed code that broke with the updates * Replaced test data set with the latest zip from https://github.com/PokeAPI/api-data * also unpacked the zip so we're not committing a binary file to git * Fixed any broken tests on the latest data * this was mostly test fixes, except making `ItemSprites.default` nullable * Attempt to set up publishing to Github Packages (untested)
1 parent 2f9cfce commit f38d17c

File tree

9,808 files changed

+9276220
-630
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

9,808 files changed

+9276220
-630
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.bat text eol=crlf
2+

.github/workflows/gradle.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This workflow will build a Java project with Gradle
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3+
4+
name: Java CI with Gradle
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up JDK 1.8
20+
uses: actions/setup-java@v1
21+
with:
22+
java-version: 1.8
23+
- name: Grant execute permission for gradlew
24+
run: chmod +x gradlew
25+
- name: Build with Gradle
26+
run: ./gradlew build --info

.github/workflows/publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
2+
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
3+
4+
name: Maven Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up JDK 1.8
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: 1.8
21+
- name: Build with Gradle
22+
run: ./gradlew assemble
23+
- name: Publish to GitHub Packages
24+
run: ./gradlew publish
25+
env:
26+
GH_USERNAME: ${{ github.actor }}
27+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
.kobalt
2-
kobaltBuild
3-
41
*.iml
52
.idea/
3+
.gradle
4+
build

.travis.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 0 additions & 63 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,9 @@ models, you should create an issue and I'll fix it as soon as possible. You can
77
also post questions, feature suggestions, general support issues, or anything
88
else.
99

10-
## Building
11-
12-
This project written in [Kotlin] and built with
13-
[Kobalt]. To build the project from the command line,
14-
clone the project and run the command `./bin/kobaltw compile` from the project root
15-
directory. You can also open the project in [IntelliJ IDEA] if you have the
16-
Kobalt plugin.
17-
1810
## Submitting changes
1911

2012
Remember to always work in a separate branch, use descriptive commit messages,
2113
and use pull requests to submit your changes. Always create an issue and mention
2214
you're working on something first. Also, make sure that all tests pass. If you
2315
add new fields or types, write the tests to check them against PokeAPI.
24-
25-
26-
[Kotlin]: https://kotlinlang.org/
27-
[Kobalt]: http://beust.com/kobalt/
28-
[IntelliJ IDEA]: https://www.jetbrains.com/idea/

README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,6 @@ dependencies {
4848
}
4949
```
5050

51-
### Kobalt
52-
53-
```kotlin
54-
val p = project {
55-
dependencies {
56-
compile("me.sargunvohra.lib:pokekotlin:2.3.0")
57-
}
58-
}
59-
```
60-
6151
### Maven
6252

6353
```xml

build.gradle.kts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
plugins {
2+
kotlin("jvm") version "1.3.70"
3+
id("maven-publish")
4+
}
5+
6+
group = "me.sargunvohra.lib"
7+
version = "2.3.1"
8+
9+
repositories {
10+
mavenCentral()
11+
}
12+
13+
dependencies {
14+
implementation(kotlin("stdlib-jdk8"))
15+
api("com.squareup.retrofit2:retrofit:2.8.1")
16+
api("com.squareup.retrofit2:converter-gson:2.8.1")
17+
api("com.squareup.retrofit2:adapter-rxjava:2.8.1")
18+
19+
testImplementation(kotlin("test"))
20+
testImplementation(kotlin("test-junit"))
21+
testImplementation(kotlin("reflect"))
22+
testImplementation("junit:junit:4.13")
23+
testImplementation("com.squareup.okhttp3:mockwebserver:3.14.8")
24+
testImplementation("de.schlichtherle.truezip:truezip-file:7.7.10")
25+
testImplementation("de.schlichtherle.truezip:truezip-driver-zip:7.7.10")
26+
}
27+
28+
publishing {
29+
repositories {
30+
mavenLocal()
31+
maven {
32+
name = "GitHubPackages"
33+
url = uri("https://maven.pkg.github.com/")
34+
credentials {
35+
username = project.findProperty("gpr.user") as String? ?: System.getenv("GH_USERNAME")
36+
password = project.findProperty("gpr.key") as String? ?: System.getenv("GH_TOKEN")
37+
}
38+
}
39+
}
40+
publications {
41+
register("gpr", MavenPublication::class) {
42+
from(components["java"])
43+
}
44+
}
45+
}

gradle/wrapper/gradle-wrapper.jar

57.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)