Advertisement
Guest User

Untitled

a guest
Apr 17th, 2020
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. plugins {
  2.     id 'org.jetbrains.kotlin.jvm' version '1.3.71'
  3.     id 'maven-publish' // <-
  4. }
  5.  
  6. def _name = "kotlin-lib"
  7. def _version = "1.0"
  8. def _group = "io.github.censored"
  9. def _repo = projectDir.getParent() + "/_repo/" // <-
  10.  
  11. group _group
  12. version _version
  13.  
  14. // <-
  15. publishing {
  16.     publications {
  17.         maven(MavenPublication) {
  18.             groupId = _group
  19.             artifactId = _name
  20.             version = _version
  21.  
  22.             from components.java
  23.         }
  24.     }
  25.     repositories {
  26.         maven {
  27.             url = _repo
  28.         }
  29.     }
  30. }
  31.  
  32. repositories {
  33.     mavenCentral()
  34. }
  35.  
  36. dependencies {
  37.     implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
  38.     testImplementation "org.junit.jupiter:junit-jupiter:5.6.0"
  39. }
  40.  
  41. compileKotlin {
  42.     kotlinOptions.jvmTarget = "1.8"
  43. }
  44.  
  45. compileTestKotlin {
  46.     kotlinOptions.jvmTarget = "1.8"
  47. }
  48.  
  49. test {
  50.     useJUnitPlatform()
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement