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

Remove dependency on commons-lang #606

Merged
merged 1 commit into from
Sep 6, 2022
Merged
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
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
6 changes: 2 additions & 4 deletions src/main/groovy/com/google/protobuf/gradle/Utils.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
}

/**
Expand Down