mirror of
https://github.com/google/nomulus.git
synced 2025-07-20 09:46:03 +02:00
Use Gradle native dependency-locking mechanism
Remove Nebula plugin and enable Gradle locking. Update publishing task to include build dependencies in resolved artifacts list. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=232349134
This commit is contained in:
parent
339202e879
commit
a325f0a50b
1 changed files with 23 additions and 5 deletions
|
@ -4,6 +4,11 @@ buildscript {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Lock buildscript dependencies.
|
||||||
|
configurations.classpath {
|
||||||
|
resolutionStrategy.activateDependencyLocking()
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.google.cloud.tools:appengine-gradle-plugin:1.3.3'
|
classpath 'com.google.cloud.tools:appengine-gradle-plugin:1.3.3'
|
||||||
classpath "net.ltgt.gradle:gradle-errorprone-plugin:0.6.1"
|
classpath "net.ltgt.gradle:gradle-errorprone-plugin:0.6.1"
|
||||||
|
@ -13,7 +18,6 @@ buildscript {
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'nebula.dependency-lock' version '7.1.0'
|
|
||||||
id 'nebula.lint' version '10.3.5'
|
id 'nebula.lint' version '10.3.5'
|
||||||
// Config helper for annotation processors such as AutoValue and Dagger.
|
// Config helper for annotation processors such as AutoValue and Dagger.
|
||||||
// Ensures that source code is generated at an appropriate location.
|
// Ensures that source code is generated at an appropriate location.
|
||||||
|
@ -54,11 +58,23 @@ subprojects {
|
||||||
// Skip no-op project
|
// Skip no-op project
|
||||||
if (project.name == 'services') return
|
if (project.name == 'services') return
|
||||||
|
|
||||||
|
buildscript {
|
||||||
|
// Lock buildscript dependencies.
|
||||||
|
configurations.classpath {
|
||||||
|
resolutionStrategy.activateDependencyLocking()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Lock application dependencies.
|
||||||
|
dependencyLocking {
|
||||||
|
lockAllConfigurations()
|
||||||
|
}
|
||||||
|
|
||||||
def services = [':services:default',
|
def services = [':services:default',
|
||||||
':services:backend',
|
':services:backend',
|
||||||
':services:tools',
|
':services:tools',
|
||||||
|
@ -104,7 +120,6 @@ subprojects {
|
||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
apply plugin: 'nebula.dependency-lock'
|
|
||||||
apply plugin: 'nebula.lint'
|
apply plugin: 'nebula.lint'
|
||||||
apply plugin: 'net.ltgt.apt'
|
apply plugin: 'net.ltgt.apt'
|
||||||
apply plugin: 'net.ltgt.errorprone'
|
apply plugin: 'net.ltgt.errorprone'
|
||||||
|
@ -145,8 +160,6 @@ subprojects {
|
||||||
// TODO(weiminyu): enable more dependency checks
|
// TODO(weiminyu): enable more dependency checks
|
||||||
]
|
]
|
||||||
|
|
||||||
dependencyLock.includeTransitives = true
|
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
|
@ -157,8 +170,13 @@ subprojects {
|
||||||
|
|
||||||
ext.getDistinctResolvedArtifacts = {
|
ext.getDistinctResolvedArtifacts = {
|
||||||
def distinctResolvedArtifacts = [:]
|
def distinctResolvedArtifacts = [:]
|
||||||
|
def allconfigs = []
|
||||||
|
|
||||||
configurations.each {
|
allconfigs.addAll(configurations)
|
||||||
|
allconfigs.addAll(buildscript.configurations)
|
||||||
|
allconfigs.addAll(rootProject.buildscript.configurations)
|
||||||
|
|
||||||
|
allconfigs.each {
|
||||||
if (!it.isCanBeResolved()) {
|
if (!it.isCanBeResolved()) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue