Skip to content

Commit

Permalink
release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellansun committed Jan 12, 2025
1 parent 9d896f8 commit f64eaa9
Showing 1 changed file with 64 additions and 3 deletions.
67 changes: 64 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@

plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id "me.champeau.jmh" version "0.7.2"
}

repositories {
// maven { url 'https://maven.aliyun.com/nexus/content/groups/public' }
mavenCentral()
}

Expand All @@ -34,8 +35,8 @@ dependencies {
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${version_junit}"
}

group 'me.sunlan'
version '1.0-SNAPSHOT'
group = 'me.sunlan'
version = '1.0.0'

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
Expand All @@ -58,6 +59,66 @@ jmh {
duplicateClassesStrategy = DuplicatesStrategy.WARN
}

java {
withJavadocJar()
withSourcesJar()
}

publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'fast-reflection'
from components.java
pom {
name = 'Fast Reflection'
description = 'Yet another extremely fast alternative for Java reflection'
url = 'https://github.com/daniellansun/fast-reflection'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'sunlan'
name = 'Daniel Sun'
}
}
scm {
connection = 'scm:git:git://github.com/daniellansun/fast-reflection.git'
developerConnection = 'scm:git:ssh://github.com/daniellansun/fast-reflection.git'
url = 'https://github.com/daniellansun/fast-reflection'
}
}
}
}
repositories {
maven {
def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
def snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username project.property('mavenUsername')
password project.property('mavenPassword')
}
}
}
}

signing {
if (project.hasProperty("signing.keyId") && project.hasProperty("signing.password")) {
useGpgCmd()
}
sign publishing.publications.mavenJava
}

javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}

tasks.withType(Wrapper).configureEach {
gradleVersion = version_gradle
}

0 comments on commit f64eaa9

Please sign in to comment.