Skip to content

Commit

Permalink
use tabs in gradle config
Browse files Browse the repository at this point in the history
  • Loading branch information
h908714124 committed Mar 29, 2024
1 parent 81a9dfb commit 3dfe87f
Show file tree
Hide file tree
Showing 2 changed files with 168 additions and 168 deletions.
186 changes: 93 additions & 93 deletions compiler/build.gradle
Original file line number Diff line number Diff line change
@@ -1,144 +1,144 @@
plugins {
id('java')
id('maven-publish')
id('com.github.johnrengelman.shadow') version('8.1.1')
id('signing')
id('java')
id('maven-publish')
id('com.github.johnrengelman.shadow') version('8.1.1')
id('signing')
}

group = 'io.github.jbock-java'

compileJava {
options.encoding = 'UTF-8'
sourceCompatibility = '11'
targetCompatibility = '11'
options.encoding = 'UTF-8'
sourceCompatibility = '11'
targetCompatibility = '11'
}

javadoc {
options.encoding = 'UTF-8'
options.encoding = 'UTF-8'
}

repositories {
mavenCentral()
mavenCentral()
}

shadowJar {
minimize()
archiveClassifier.set('')
minimize()
archiveClassifier.set('')
}

tasks.withType(AbstractArchiveTask).configureEach {
preserveFileTimestamps = false
reproducibleFileOrder = true
preserveFileTimestamps = false
reproducibleFileOrder = true
}

tasks.withType(GenerateModuleMetadata).configureEach {
enabled = true
enabled = true
}

shadowJar {
minimize()
archiveClassifier.set('')
relocate('io.jbock.auto.common', 'io.jbock.jbock.auto.common')
relocate('io.jbock.javapoet', 'io.jbock.jbock.javapoet')
minimize()
archiveClassifier.set('')
relocate('io.jbock.auto.common', 'io.jbock.jbock.auto.common')
relocate('io.jbock.javapoet', 'io.jbock.jbock.javapoet')
}

dependencies {
def jbock = project(':jbock')
def simple_component = 'io.github.jbock-java:simple-component:1.024'
def javapoet = 'io.github.jbock-java:javapoet:1.15'
implementation(javapoet)
implementation('io.github.jbock-java:auto-common:1.2.3')
shadow(jbock)
compileOnly(simple_component)
annotationProcessor('io.github.jbock-java:simple-component-compiler:1.024')
testImplementation('io.github.jbock-java:compile-testing:0.19.12')
testImplementation('org.junit.jupiter:junit-jupiter:5.10.2')
testImplementation('org.mockito:mockito-core:5.11.0')
testImplementation(jbock)
testImplementation(simple_component)
def jbock = project(':jbock')
def simple_component = 'io.github.jbock-java:simple-component:1.024'
def javapoet = 'io.github.jbock-java:javapoet:1.15'
implementation(javapoet)
implementation('io.github.jbock-java:auto-common:1.2.3')
shadow(jbock)
compileOnly(simple_component)
annotationProcessor('io.github.jbock-java:simple-component-compiler:1.024')
testImplementation('io.github.jbock-java:compile-testing:0.19.12')
testImplementation('org.junit.jupiter:junit-jupiter:5.10.2')
testImplementation('org.mockito:mockito-core:5.11.0')
testImplementation(jbock)
testImplementation(simple_component)
}

jar {
manifest {
attributes(
'Implementation-Version': project.properties['version']
)
}
manifest {
attributes(
'Implementation-Version': project.properties['version']
)
}
}

test {
useJUnitPlatform()
testLogging {
events('failed')
}
useJUnitPlatform()
testLogging {
events('failed')
}
}

tasks.register('javadocJar', Jar) {
from javadoc
archiveClassifier.set('javadoc')
from javadoc
archiveClassifier.set('javadoc')
}

tasks.register('sourcesJar', Jar) {
from sourceSets.main.allJava
archiveClassifier.set('sources')
from sourceSets.main.allJava
archiveClassifier.set('sources')
}

artifacts {
archives(javadocJar, sourcesJar)
archives(javadocJar, sourcesJar)
}

// https://central.sonatype.org/pages/gradle.html
publishing {
publications {
shadow(MavenPublication) { publication ->
project.shadow.component(publication)
artifactId = 'jbock-compiler'

artifact sourcesJar
artifact javadocJar

pom {
name = 'jbock-compiler'
packaging = 'jar'
description = 'jbock annotation processor'
url = 'https://github.com/jbock-java/jbock'

licenses {
license {
name = 'MIT License'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
id = 'Various'
name = 'Various'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:https://github.com/jbock-java/jbock.git'
developerConnection = 'scm:git:https://github.com/jbock-java/jbock.git'
url = 'https://github.com/jbock-java/jbock'
}
}
}
}
repositories {
maven {
url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username = System.getenv('OSS_USER')
password = System.getenv('OSS_PASS')
}
}
}
publications {
shadow(MavenPublication) { publication ->
project.shadow.component(publication)
artifactId = 'jbock-compiler'

artifact sourcesJar
artifact javadocJar

pom {
name = 'jbock-compiler'
packaging = 'jar'
description = 'jbock annotation processor'
url = 'https://github.com/jbock-java/jbock'

licenses {
license {
name = 'MIT License'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
id = 'Various'
name = 'Various'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:https://github.com/jbock-java/jbock.git'
developerConnection = 'scm:git:https://github.com/jbock-java/jbock.git'
url = 'https://github.com/jbock-java/jbock'
}
}
}
}
repositories {
maven {
url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username = System.getenv('OSS_USER')
password = System.getenv('OSS_PASS')
}
}
}
}

// https://docs.gradle.org/current/userguide/signing_plugin.html
signing {
def signingKey = findProperty('signingKey')
def signingPassword = findProperty('signingPassword')
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.shadow
def signingKey = findProperty('signingKey')
def signingPassword = findProperty('signingPassword')
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.shadow
}
Loading

0 comments on commit 3dfe87f

Please sign in to comment.