diff --git a/build.gradle b/build.gradle index 80b8b0f..aefd99c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,63 @@ plugins { - id 'java' + id 'org.jetbrains.kotlin.jvm' version '1.3.70' apply false +} + +allprojects { + apply plugin: 'java' + apply plugin: 'maven' + apply plugin: 'kotlin' + + version = "0.1.0-SNAPSHOT" + group = "io.github.wulkanowy" + + repositories { + mavenCentral() + } +} + +subprojects { + apply plugin: 'jacoco' + + sourceCompatibility = 1.8 + + compileKotlin { + kotlinOptions { + jvmTarget = "1.6" + javaParameters = true + } + } + + dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" + implementation "com.brsanthu:migbase64:2.2" + testImplementation "junit:junit:4.13" + } + + jacocoTestReport { + reports { + xml.enabled true + } + } + + test { + testLogging.showStandardStreams = false + } + + group = "io.github.wulkanowy.signer" + if (project.plugins.hasPlugin('java')) { + task sourcesJar(type: Jar, dependsOn: classes) { + classifier = 'sources' + from sourceSets.main.allSource + } + task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir + } + artifacts { + archives sourcesJar + archives javadocJar + } + } } dependencies { diff --git a/hebe-jvm/build.gradle b/hebe-jvm/build.gradle index 9240b7d..a9ab90e 100644 --- a/hebe-jvm/build.gradle +++ b/hebe-jvm/build.gradle @@ -1,48 +1,4 @@ plugins { id 'java' - id 'org.jetbrains.kotlin.jvm' version '1.3.70' - id 'jacoco' -} - -group 'io.github.wulkanowy' -version '0.1.0-SNAPSHOT' - -sourceCompatibility = 1.6 - -repositories { - mavenCentral() -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" - implementation "com.brsanthu:migbase64:2.2" - testImplementation "junit:junit:4.13" -} - -compileKotlin { - kotlinOptions.jvmTarget = "1.8" -} -compileTestKotlin { - kotlinOptions.jvmTarget = "1.8" -} - -jacocoTestReport { - reports { - xml.enabled true - } -} - -task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' - from sourceSets.main.allSource -} - -task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' - from javadoc.destinationDir -} - -artifacts { - archives sourcesJar - archives javadocJar + id 'org.jetbrains.kotlin.jvm' } diff --git a/jvm/build.gradle b/jvm/build.gradle index f2ae868..a9ab90e 100644 --- a/jvm/build.gradle +++ b/jvm/build.gradle @@ -1,48 +1,4 @@ plugins { id 'java' - id 'org.jetbrains.kotlin.jvm' version '1.3.70' - id 'jacoco' -} - -group 'io.github.wulkanowy' -version '0.1.0-SNAPSHOT' - -sourceCompatibility = 1.6 - -repositories { - mavenCentral() -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" - implementation "com.brsanthu:migbase64:2.2" - testImplementation "junit:junit:4.13" -} - -compileKotlin { - kotlinOptions.jvmTarget = "1.6" -} -compileTestKotlin { - kotlinOptions.jvmTarget = "1.6" -} - -jacocoTestReport { - reports { - xml.enabled true - } -} - -task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' - from sourceSets.main.allSource -} - -task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' - from javadoc.destinationDir -} - -artifacts { - archives sourcesJar - archives javadocJar + id 'org.jetbrains.kotlin.jvm' } diff --git a/settings.gradle b/settings.gradle index 4252d2a..6d65301 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,4 @@ +rootProject.name = 'uonet-request-signer' + include 'hebe-jvm' include 'jvm'