-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added test code - Gson -> JsonReader - ArrayList -> Custom Class - LICENSE, README.md - Travis CI - Ready for Use (Central Maven Repository)
- Loading branch information
1 parent
54686b2
commit 2a714a9
Showing
16 changed files
with
1,011 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,25 @@ | ||
# Copyright (C) 2020 PatrickKR | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License | ||
# as published by the Free Software Foundation; either version 2 | ||
# of the License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
# | ||
# Contact me on <[email protected]> | ||
|
||
/.gradle/ | ||
/.idea/ | ||
/build/ | ||
*.class | ||
*.jar | ||
gradle.properties | ||
!gradle-wrapper.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Copyright (C) 2020 PatrickKR | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License | ||
# as published by the Free Software Foundation; either version 2 | ||
# of the License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
# | ||
# Contact me on <[email protected]> | ||
|
||
language: java | ||
|
||
os: linux | ||
|
||
dist: xenial | ||
|
||
jdk: | ||
- openjdk8 | ||
- openjdk10 | ||
- openjdk11 | ||
|
||
before_install: | ||
- chmod +x ./gradlew | ||
|
||
cache: | ||
directories: | ||
- '$HOME/.m2' | ||
- '$HOME/.gradle' | ||
|
||
install: | ||
- ./gradlew test | ||
- ./gradlew publishToMavenLocal | ||
|
||
after_success: | ||
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh | ||
- chmod +x send.sh | ||
- ./send.sh success $WEBHOOK_URL | ||
|
||
after_failure: | ||
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh | ||
- chmod +x send.sh | ||
- ./send.sh failure $WEBHOOK_URL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Comcigan Library (written in Kotlin) | ||
|
||
## Repositories | ||
|
||
### Gradle (Groovy DSL) | ||
|
||
```groovy | ||
allprojects { | ||
repositories { | ||
mavenCentral() // or maven { url 'https://repo.maven.apache.org/maven2/' } | ||
} | ||
} | ||
``` | ||
|
||
```groovy | ||
dependencies { | ||
implementation 'io.teamif:comcigan-lib:1.0' | ||
} | ||
``` | ||
|
||
### Gradle (Kotlin DSL) | ||
|
||
```kotlin | ||
allprojects { | ||
repositories { | ||
mavenCentral() // or maven("https://repo.maven.apache.org/maven2/") | ||
} | ||
} | ||
``` | ||
|
||
```kotlin | ||
dependencies { | ||
implementation("io.teamif:comcigan-lib:1.0") | ||
} | ||
``` | ||
|
||
## How to use | ||
|
||
See [Test Code](https://github.com/Team-IF/comcigan-lib/blob/master/src/test/kotlin/io/teamif/patrick/comcigan/ComciganAPITest.kt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,153 @@ | ||
/* | ||
* Copyright (C) 2020 PatrickKR | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
* | ||
* Contact me on <[email protected]> | ||
*/ | ||
|
||
import groovy.lang.MissingPropertyException | ||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar | ||
import org.gradle.jvm.tasks.Jar | ||
import org.jetbrains.dokka.gradle.DokkaTask | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
plugins { | ||
`maven-publish` | ||
signing | ||
kotlin("jvm") version "1.4-M3" | ||
id("org.jetbrains.dokka") version "0.10.1" | ||
id("org.jetbrains.dokka") version "1.4-mc-1" | ||
id("com.github.johnrengelman.shadow") version "6.0.0" | ||
} | ||
|
||
group = "io.teamif" | ||
version = "1.0" | ||
|
||
repositories { | ||
maven("https://repo.maven.apache.org/maven2/") | ||
maven("https://jcenter.bintray.com/") | ||
maven("https://dl.bintray.com/kotlin/kotlin-eap") | ||
maven("https://dl.bintray.com/kotlin/dokka") | ||
maven("https://dl.bintray.com/kotlin/kotlin-eap/") | ||
maven("https://dl.bintray.com/kotlin/kotlin-dev/") | ||
} | ||
dependencies { | ||
implementation(kotlin("stdlib-jdk8")) | ||
implementation("com.google.code.gson:gson:2.8.6") | ||
testImplementation(kotlin("test-junit")) | ||
} | ||
|
||
tasks { | ||
withType<KotlinCompile> { | ||
kotlinOptions.jvmTarget = "1.8" | ||
} | ||
} | ||
|
||
create<Jar>("sourcesJar") { | ||
archiveClassifier.set("sources") | ||
from(sourceSets["main"].allSource) | ||
} | ||
|
||
create<Jar>("dokkaJar") { | ||
dependsOn("dokkaHtml") | ||
from("$buildDir/dokka/html/") { | ||
include("**") | ||
} | ||
from("$rootDir/src/main/resources/") { | ||
include("**") | ||
} | ||
archiveClassifier.set("javadoc") | ||
} | ||
|
||
withType<DokkaTask> { | ||
dokkaSourceSets { | ||
register("main") { | ||
sourceLink { | ||
path = "src/main/kotlin" | ||
url = "https://github.com/Team-IF/comcigan-lib/tree/master/src/main/kotlin" | ||
lineSuffix = "#L" | ||
} | ||
} | ||
} | ||
} | ||
|
||
withType<ShadowJar> { | ||
archiveClassifier.set("") | ||
} | ||
} | ||
|
||
try { | ||
publishing { | ||
publications { | ||
create<MavenPublication>("comciganLib") { | ||
artifact(tasks["sourcesJar"]) | ||
artifact(tasks["dokkaJar"]) | ||
artifact(tasks["shadowJar"]) | ||
|
||
repositories { | ||
mavenLocal() | ||
|
||
maven { | ||
name = "central" | ||
|
||
credentials { | ||
username = project.property("centralUsername").toString() | ||
password = project.property("centralPassword").toString() | ||
} | ||
|
||
url = if (version.toString().endsWith("SNAPSHOT")) { | ||
uri("https://oss.sonatype.org/content/repositories/snapshots/") | ||
} else { | ||
uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/") | ||
} | ||
} | ||
} | ||
|
||
pom { | ||
name.set("comcigan-lib") | ||
description.set("A Comcigan library written in Kotlin") | ||
url.set("https://github.com/Team-IF/comcigan-lib") | ||
|
||
licenses { | ||
license { | ||
name.set("GNU General Public License v2.0") | ||
url.set("https://opensource.org/licenses/gpl-2.0.php") | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id.set("patrick-mc") | ||
name.set("PatrickKR") | ||
email.set("[email protected]") | ||
url.set("https://github.com/patrick-mc") | ||
roles.addAll("developer") | ||
timezone.set("Asia/Seoul") | ||
} | ||
} | ||
|
||
scm { | ||
connection.set("scm:git:git://github.com/Team-IF/comcigan-lib.git") | ||
developerConnection.set("scm:git:ssh://github.com:Team-IF/comcigan-lib.git") | ||
url.set("https://github.com/Team-IF/comcigan-lib") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
isRequired = true | ||
sign(tasks["sourcesJar"], tasks["dokkaJar"], tasks["shadowJar"]) | ||
sign(publishing.publications["comciganLib"]) | ||
} | ||
} catch (ignored: MissingPropertyException) {} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,21 @@ | ||
# Copyright (C) 2020 PatrickKR | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License | ||
# as published by the Free Software Foundation; either version 2 | ||
# of the License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
# | ||
# Contact me on <[email protected]> | ||
|
||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-rc-1-bin.zip | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,28 @@ | ||
/* | ||
* Copyright (C) 2020 PatrickKR | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
* | ||
* Contact me on <[email protected]> | ||
*/ | ||
|
||
rootProject.name = "comcigan-lib" | ||
|
||
pluginManagement { | ||
repositories { | ||
maven("https://plugins.gradle.org/m2/") | ||
maven("https://dl.bintray.com/kotlin/kotlin-eap") | ||
maven("https://dl.bintray.com/kotlin/kotlin-dev/") | ||
} | ||
} |
Oops, something went wrong.