Moving to a more up to date system.

-Changed: Moved to gradle 7.3 for java17 support of the project.
-Changed: Moved to maven-publish plugin and added a bit more info to the poms.
This commit is contained in:
Speiger 2022-04-07 16:00:58 +02:00
parent 769a9d8ea5
commit f27b884b6a
2 changed files with 38 additions and 21 deletions

View File

@ -8,7 +8,7 @@ tasks.withType(JavaCompile) {
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'eclipse' apply plugin: 'eclipse'
apply plugin: 'maven' apply plugin: 'maven-publish'
repositories { repositories {
mavenCentral() mavenCentral()
@ -18,7 +18,7 @@ repositories {
} }
archivesBaseName = 'Primitive Collections' archivesBaseName = 'Primitive Collections'
version = '0.5.3'; version = '0.5.4';
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
@ -33,6 +33,10 @@ eclipse {
} }
} }
jar {
classifier = "jar"
}
sourceSets { sourceSets {
builder builder
} }
@ -42,8 +46,7 @@ configurations {
} }
dependencies { dependencies {
builderCompile 'de.speiger:Simple-Code-Generator:1.0.6' builderImplementation 'de.speiger:Simple-Code-Generator:1.0.6'
runtimeOnly 'de.speiger:Simple-Code-Generator:1.0.6'
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
testImplementation 'com.google.guava:guava-testlib:31.0.1-jre' testImplementation 'com.google.guava:guava-testlib:31.0.1-jre'
} }
@ -94,24 +97,23 @@ test {
useJUnit() useJUnit()
} }
uploadArchives { publishing {
Properties props = new Properties() Properties props = new Properties()
if(file("$buildDir/credentials.properties").exists()) if(file("$buildDir/credentials.properties").exists()) {
{
props.load(new FileInputStream("$buildDir/credentials.properties")) props.load(new FileInputStream("$buildDir/credentials.properties"))
} }
repositories.mavenDeployer { publications {
repository(url: 'https://maven.speiger.com/repository/main') { mavenJava(MavenPublication) {
authentication(userName: props.mavenUser, password: props.mavenPassword) pom {
} name = 'Primitive Collections'
snapshotRepository(url: 'https://maven.speiger.com/repository/main') { description = 'A Primitive Collection library that reduces memory usage and improves performance'
authentication(userName: props.mavenUser, password: props.mavenPassword) url = 'https://github.com/Speiger/Primitive-Collections'
} version = project.version
pom { artifactId = project.archivesBaseName.replace(" ", "-")
version = project.version groupId = 'de.speiger'
artifactId = project.archivesBaseName.replace(" ", "-") from components.java
groupId = 'de.speiger' artifact tasks.srcJar
project { artifact tasks.javadocJar
licenses { licenses {
license { license {
name = 'The Apache License, Version 2.0' name = 'The Apache License, Version 2.0'
@ -122,9 +124,24 @@ uploadArchives {
developer { developer {
id = 'speiger' id = 'speiger'
name = 'Speiger' name = 'Speiger'
email = 'speiger@gmx.net'
} }
} }
scm {
url = 'https://github.com/Speiger/Primitive-Collections'
}
issueManagement {
system = 'github'
url = 'https://github.com/Speiger/Primitive-Collections/issues'
}
}
}
}
repositories {
maven {
url version.endsWith('SNAPSHOT') ? "https://maven.speiger.com/repository/debug" : "https://maven.speiger.com/repository/main"
credentials(PasswordCredentials) {
username props.mavenUser
password props.mavenPassword
} }
} }
} }

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists