llog/build.gradle
2021-02-10 20:54:19 +01:00

52 lines
1.2 KiB
Groovy

plugins {
id 'java'
id 'maven-publish'
}
group 'org.example'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}
test {
useJUnitPlatform()
}
def privatePropertiesFile = rootProject.file("private.properties");
def privateProperties = new Properties()
privateProperties.load(new FileInputStream(privatePropertiesFile))
def getDate() {
def date = new Date()
def formattedDate = date.format('yyMMddHHmm')
return formattedDate
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId = 'fr.doap.dlog'
artifactId = 'dlog'
version = "0.9.4-SNAPSHOT"
from components.java
}
}
repositories {
maven {
// url = "https://maven.doap.fr/repository/maven-releases/"
url = "https://maven.doap.fr/repository/maven-snapshots/"
credentials {
username privateProperties["mavenUsername"]
password privateProperties["mavenPassword"]
}
}
}
}