Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency updates #263

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions auto-value-gson-extension/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import org.gradle.internal.jvm.Jvm

plugins {
id 'com.github.johnrengelman.shadow' version '4.0.1'
id 'com.github.johnrengelman.shadow' version '7.0.0'
id 'java-library'
id 'maven-publish'
}
Expand All @@ -28,7 +28,7 @@ shadowJar {
exclude 'META-INF/maven/com.google.auto/auto-common/**'
}
artifacts {
runtime shadowJar
runtimeOnly shadowJar
archives shadowJar
}
//</editor-fold>
Expand All @@ -37,23 +37,24 @@ sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

dependencies {
annotationProcessor "net.ltgt.gradle.incap:incap-processor:0.2"
annotationProcessor 'com.google.auto.service:auto-service:1.0-rc5'
annotationProcessor 'com.google.auto.value:auto-value:1.7'
compileOnly "net.ltgt.gradle.incap:incap:0.2"
compileOnly 'com.google.auto.service:auto-service:1.0-rc5'
annotationProcessor "net.ltgt.gradle.incap:incap-processor:0.3"
annotationProcessor 'com.google.auto.service:auto-service:1.0'
annotationProcessor 'com.google.auto.value:auto-value:1.8.2'
compileOnly "net.ltgt.gradle.incap:incap:0.3"
compileOnly 'com.google.auto.service:auto-service:1.0'

api 'com.google.auto.value:auto-value:1.7'
api 'com.google.auto.value:auto-value-annotations:1.7'
api project(':auto-value-gson-runtime')
compileShaded 'com.google.auto:auto-common:0.10'
compileShaded 'com.google.guava:guava:27.0-jre'
implementation 'com.squareup:javapoet:1.12.0'
api 'com.google.auto.value:auto-value:1.8.2'
api 'com.google.auto.value:auto-value-annotations:1.8.2'
api project(path: ':auto-value-gson-runtime', configuration:'archives')
api deps.autotransient
compileShaded 'com.google.auto:auto-common:1.1.2'
compileShaded 'com.google.guava:guava:30.1.1-jre'
implementation 'com.squareup:javapoet:1.13.0'
implementation deps.gson

testImplementation 'junit:junit:4.12'
testImplementation 'com.google.truth:truth:0.42'
testImplementation 'com.google.testing.compile:compile-testing:0.16'
testImplementation 'junit:junit:4.13.2'
testImplementation 'com.google.truth:truth:1.1.3'
testImplementation 'com.google.testing.compile:compile-testing:0.19'
testImplementation files(Jvm.current().getToolsJar())
}

Expand Down
27 changes: 14 additions & 13 deletions auto-value-gson-factory/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import org.gradle.internal.jvm.Jvm

plugins {
id 'com.github.johnrengelman.shadow' version '4.0.1'
id 'com.github.johnrengelman.shadow' version '7.0.0'
id 'java-library'
id 'maven-publish'
}
Expand All @@ -28,7 +28,7 @@ shadowJar {
exclude 'META-INF/maven/com.google.auto/auto-common/**'
}
artifacts {
runtime shadowJar
runtimeOnly shadowJar
archives shadowJar
}
//</editor-fold>
Expand All @@ -37,21 +37,22 @@ sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

dependencies {
annotationProcessor "net.ltgt.gradle.incap:incap-processor:0.2"
annotationProcessor 'com.google.auto.service:auto-service:1.0-rc5'
compileOnly "net.ltgt.gradle.incap:incap:0.2"
compileOnly 'com.google.auto.service:auto-service:1.0-rc5'
annotationProcessor "net.ltgt.gradle.incap:incap-processor:0.3"
annotationProcessor 'com.google.auto.service:auto-service:1.0'
compileOnly "net.ltgt.gradle.incap:incap:0.3"
compileOnly 'com.google.auto.service:auto-service:1.0'

api 'com.google.auto.value:auto-value-annotations:1.7'
api 'com.google.auto.value:auto-value-annotations:1.8.2'
api project(':auto-value-gson-extension')
compileShaded 'com.google.auto:auto-common:0.10'
compileShaded 'com.google.guava:guava:27.0-jre'
implementation 'com.squareup:javapoet:1.12.0'
compileShaded 'com.google.auto:auto-common:1.1.2'
compileShaded 'com.google.guava:guava:30.1.1-jre'
implementation 'com.squareup:javapoet:1.13.0'
implementation deps.gson

testImplementation 'junit:junit:4.12'
testImplementation 'com.google.truth:truth:0.42'
testImplementation 'com.google.testing.compile:compile-testing:0.16'
testImplementation 'junit:junit:4.13.2'
testImplementation 'com.google.truth:truth:1.1.3'
testImplementation 'com.google.testing.compile:compile-testing:0.19'
testCompileOnly "net.ltgt.gradle.incap:incap:0.3"
testImplementation files(Jvm.current().getToolsJar())
}

Expand Down
1 change: 0 additions & 1 deletion auto-value-gson-runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ targetCompatibility = JavaVersion.VERSION_1_8
dependencies {
compileOnly deps.errorProneAnnotations
compileOnly deps.jetbrainsAnnotations
api deps.autotransient
api deps.gson
}

Expand Down
11 changes: 4 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ buildscript {
}
dependencies {
classpath "net.ltgt.gradle:gradle-apt-plugin:0.19"
classpath "org.owasp:dependency-check-gradle:6.3.0"
}
}

allprojects { project ->
apply plugin: "org.owasp.dependencycheck"
project.repositories {
maven {
url 'http://oss.sonatype.org/content/repositories/snapshots'
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
mavenCentral()
}
Expand All @@ -42,9 +44,4 @@ ext.deps = [
errorProneAnnotations: 'com.google.errorprone:error_prone_annotations:2.3.1',
jetbrainsAnnotations: 'org.jetbrains:annotations-java5:16.0.2',
gson: 'com.google.code.gson:gson:2.8.5'
]

task wrapper(type: Wrapper) {
gradleVersion = '4.10.2'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
}
]
14 changes: 7 additions & 7 deletions example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ tasks.withType(JavaCompile) {
}

dependencies {
annotationProcessor 'com.google.auto.value:auto-value:1.7'
annotationProcessor 'com.google.auto.value:auto-value:1.8.2'
annotationProcessor project(':auto-value-gson')
compileOnly project(':auto-value-gson')
compileOnly 'com.google.auto.value:auto-value-annotations:1.7'
compile 'com.google.code.gson:gson:2.8.6'
compile project(':auto-value-gson-runtime')
compileOnly 'com.google.auto.value:auto-value-annotations:1.8.2'
implementation 'com.google.code.gson:gson:2.8.8'
implementation project(':auto-value-gson-runtime')

testCompile 'junit:junit:4.12'
testAnnotationProcessor 'com.google.auto.value:auto-value:1.7'
testImplementation 'junit:junit:4.13.2'
testAnnotationProcessor 'com.google.auto.value:auto-value:1.8.2'
testAnnotationProcessor project(':auto-value-gson')
testCompileOnly 'com.google.auto.value:auto-value-annotations:1.7'
testCompileOnly 'com.google.auto.value:auto-value-annotations:1.8.2'
}
185 changes: 44 additions & 141 deletions gradle/gradle-mvn-push.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
* limitations under the License.
*/

apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'java-library'

version = VERSION_NAME
group = GROUP
Expand All @@ -42,159 +43,72 @@ def getRepositoryPassword() {
return hasProperty('SONATYPE_NEXUS_PASSWORD') ? SONATYPE_NEXUS_PASSWORD : ""
}

afterEvaluate { project ->
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

pom.groupId = GROUP
pom.artifactId = POM_ARTIFACT_ID
pom.version = VERSION_NAME

repository(url: getReleaseRepositoryUrl()) {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}
snapshotRepository(url: getSnapshotRepositoryUrl()) {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}

pom.project {
name POM_NAME
packaging POM_PACKAGING
description POM_DESCRIPTION
url POM_URL

scm {
url POM_SCM_URL
connection POM_SCM_CONNECTION
developerConnection POM_SCM_DEV_CONNECTION
}

licenses {
license {
name POM_LICENCE_NAME
url POM_LICENCE_URL
distribution POM_LICENCE_DIST
}
}
java {
withSourcesJar()
withJavadocJar()
}

developers {
developer {
id POM_DEVELOPER_ID
name POM_DEVELOPER_NAME
}
}
afterEvaluate { project ->
publishing {
publications {
maven(MavenPublication) {
groupId = GROUP
artifactId = POM_ARTIFACT_ID
version = VERSION_NAME

artifact tasks.sourcesJar
artifact tasks.javadocJar

if (project.tasks.findByName('shadowJar')) {
artifact tasks.shadowJar
} else {
artifact tasks.jar
}
}
}
}

signing {
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}

if (project.getPlugins().hasPlugin('com.android.application') ||
project.getPlugins().hasPlugin('com.android.library')) {
task install(type: Upload, dependsOn: assemble) {
repositories.mavenInstaller {
configuration = configurations.archives

pom.groupId = GROUP
pom.artifactId = POM_ARTIFACT_ID
pom.version = VERSION_NAME

pom.project {
name POM_NAME
packaging POM_PACKAGING
description POM_DESCRIPTION
url POM_URL
pom {
name = POM_NAME
packaging = POM_PACKAGING
description = POM_DESCRIPTION
url = POM_URL

scm {
url POM_SCM_URL
connection POM_SCM_CONNECTION
developerConnection POM_SCM_DEV_CONNECTION
url = POM_SCM_URL
connection = POM_SCM_CONNECTION
developerConnection = POM_SCM_DEV_CONNECTION
}

licenses {
license {
name POM_LICENCE_NAME
url POM_LICENCE_URL
distribution POM_LICENCE_DIST
name = POM_LICENCE_NAME
url = POM_LICENCE_URL
distribution = POM_LICENCE_DIST
}
}

developers {
developer {
id POM_DEVELOPER_ID
name POM_DEVELOPER_NAME
id = POM_DEVELOPER_ID
name = POM_DEVELOPER_NAME
}
}
}
}
}
repositories {
maven {
url = isReleaseBuild() ? getReleaseRepositoryUrl() : getSnapshotRepositoryUrl()

task androidJavadocs(type: Javadoc) {
source = android.sourceSets.main.java.source
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
classifier = 'javadoc'
from androidJavadocs.destinationDir
}

task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.source
}
} else {
install {
repositories.mavenInstaller {
pom.groupId = GROUP
pom.artifactId = POM_ARTIFACT_ID
pom.version = VERSION_NAME

pom.project {
name POM_NAME
packaging POM_PACKAGING
description POM_DESCRIPTION
url POM_URL

scm {
url POM_SCM_URL
connection POM_SCM_CONNECTION
developerConnection POM_SCM_DEV_CONNECTION
}

licenses {
license {
name POM_LICENCE_NAME
url POM_LICENCE_URL
distribution POM_LICENCE_DIST
}
}

developers {
developer {
id POM_DEVELOPER_ID
name POM_DEVELOPER_NAME
}
}
credentials {
username = getRepositoryUsername()
password = getRepositoryPassword()
}
}
}
}

task sourcesJar(type: Jar, dependsOn:classes) {
classifier = 'sources'
from sourceSets.main.allSource
}

task javadocJar(type: Jar, dependsOn:javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
signing {
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
sign publishing.publications.maven
}

if (JavaVersion.current().isJava8Compatible()) {
Expand All @@ -204,15 +118,4 @@ afterEvaluate { project ->
}
}
}

artifacts {
if (project.getPlugins().hasPlugin('com.android.application') ||
project.getPlugins().hasPlugin('com.android.library')) {
archives androidSourcesJar
archives androidJavadocsJar
} else {
archives sourcesJar
archives javadocJar
}
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Loading