From 7e3f3c0c9f003c4a2afc57f019a59786af630e1b Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Sat, 13 Aug 2022 10:52:47 -0700 Subject: [PATCH] Remove dependency on commons-lang --- build.gradle | 1 - src/main/groovy/com/google/protobuf/gradle/Utils.groovy | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 7c2f52cd..74141c53 100644 --- a/build.gradle +++ b/build.gradle @@ -58,7 +58,6 @@ dependencies { implementation 'com.google.guava:guava:27.0.1-jre' implementation 'com.google.gradle:osdetector-gradle-plugin:1.7.0' - implementation 'commons-lang:commons-lang:2.6' testImplementation 'junit:junit:4.12' testImplementation('org.spockframework:spock-core:1.0-groovy-2.4') { diff --git a/src/main/groovy/com/google/protobuf/gradle/Utils.groovy b/src/main/groovy/com/google/protobuf/gradle/Utils.groovy index 9a763c60..8ca87af1 100644 --- a/src/main/groovy/com/google/protobuf/gradle/Utils.groovy +++ b/src/main/groovy/com/google/protobuf/gradle/Utils.groovy @@ -30,7 +30,6 @@ package com.google.protobuf.gradle import com.google.common.base.Preconditions import groovy.transform.CompileStatic -import org.apache.commons.lang.StringUtils import org.gradle.api.Project import org.gradle.api.tasks.SourceSet import org.gradle.plugins.ide.idea.GenerateIdeaModule @@ -46,9 +45,8 @@ class Utils { */ static String getConfigName(String sourceSetName, String type) { // same as DefaultSourceSet.configurationNameOf - String baseName = sourceSetName == SourceSet.MAIN_SOURCE_SET_NAME ? - '' : sourceSetName.capitalize() - return StringUtils.uncapitalize(baseName + StringUtils.capitalize(type)) + return sourceSetName == SourceSet.MAIN_SOURCE_SET_NAME + ? type : sourceSetName + type.capitalize() } /**