diff --git a/.gitignore b/.gitignore index ad41c50..39eaaa5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ -.idea -out -.gradle -build \ No newline at end of file +.idea/ +out/ +.gradle/ +build/ + +gradle.properties diff --git a/README.md b/README.md index 2394681..7b42ea6 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # commons -ititus-commons \ No newline at end of file +ititus-commons + +[![Bintray](https://img.shields.io/bintray/v/ititus/ititus-commons/commons)](https://bintray.com/ititus/ititus-commons/commons/_latestVersion) diff --git a/build.gradle b/build.gradle index 8d6502c..66e3162 100644 --- a/build.gradle +++ b/build.gradle @@ -1,16 +1,19 @@ plugins { - id 'java' + id 'java-library' id 'maven-publish' + id 'com.jfrog.bintray' version '1.8.5' } -group 'io.github.ititus' -version '1.0.0-SNAPSHOT' +group = 'io.github.ititus' +version = '1.0.0' -sourceCompatibility = JavaVersion.VERSION_11 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(15) + } -task sourcesJar(type: Jar) { - from sourceSets.main.allJava - archiveClassifier = 'sources' + withSourcesJar() + withJavadocJar() } repositories { @@ -26,10 +29,8 @@ dependencies { publishing { publications { - defaultPublication(MavenPublication) { - artifactId = 'ititus-commons' + MyPublication(MavenPublication) { from components.java - artifact sourcesJar } } } @@ -37,3 +38,17 @@ publishing { test { useJUnitPlatform() } + +bintray { + user = project.property('bintray_user') + key = project.property('bintray_api_key') + publications = ['MyPublication'] + publish = true + pkg { + repo = 'ititus-commons' + name = 'commons' + version { + name = project.version + } + } +}