/*
 * Copyright 2016 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.gradle.api.artifacts;

import org.gradle.api.Incubating;

/**
 * A configuration role defines the role of a configuration during dependency resolution.
 */
@Incubating
public enum ConfigurationRole {
    CAN_BE_QUERIED_OR_CONSUMED("can be used when building or publishing", true, true),
    CAN_BE_QUERIED_ONLY("It is possible to query this configuration or resolve it", true, false),
    CAN_BE_CONSUMED_ONLY("can be used only when consuming or publishing the project", false, true),
    BUCKET("Used as a bucket of dependencies, not supposed to be consumed or built directly", false, false);

    private final String description;
    private final boolean canBeQueriedOrResolved;
    private final boolean canBeConsumedOrPublished;

    ConfigurationRole(String desc, boolean canBeQueriedOrResolved, boolean canBeConsumedOrPublished) {
        this.description = desc;
        this.canBeQueriedOrResolved = canBeQueriedOrResolved;
        this.canBeConsumedOrPublished = canBeConsumedOrPublished;
    }

    public String getDescription() {
        return description;
    }

    public boolean canBeQueriedOrResolved() {
        return canBeQueriedOrResolved;
    }

    public boolean canBeConsumedOrPublished() {
        return canBeConsumedOrPublished;
    }
}

@@ -829,36 +829,47 @@
     
-CAN_BE_QUERIED_OR_CONSUMED(%22
+/**%0A     * Use this if a configuration 
 can 
@@ -876,16 +876,23 @@
 be used 
+either 
 when bui
@@ -914,23 +914,17 @@
 hing
-%22, true, true),
+.%0A     */
 %0A   
@@ -944,17 +944,63 @@
 ED_O
-NLY(%22It i
+R_CONSUMED(true, true),%0A%0A    /**%0A     * Use this if it'
 s po
@@ -1051,24 +1051,22 @@
 e it
-%22, true, false),
+ only.%0A     */
 %0A   
@@ -1077,22 +1077,21 @@
 _BE_
-CONSUM
+QUERI
 ED_ONLY(
 %22can
@@ -1086,17 +1086,76 @@
 ED_ONLY(
-%22
+true, false),%0A%0A    /**%0A     * Use this if the configuration 
 can be u
@@ -1203,19 +1203,51 @@
  project
-%22, 
+.%0A     */%0A    CAN_BE_CONSUMED_ONLY(
 false, t
@@ -1256,21 +1256,57 @@
 e),%0A
+%0A
     
-BUCKET(%22U
+/**%0A     * Use this if the configuration is 
 sed 
@@ -1383,64 +1383,247 @@
 ctly
-%22, false, false);%0A%0A    private final String description;
+.%0A     * This typically includes the case where you define a parent configuration where the user would declare its dependencies%0A     * but only child configurations are supposed to be used for resolution.%0A     */%0A    BUCKET(false, false);%0A
 %0A   
@@ -1748,21 +1748,8 @@
 ole(
-String desc, 
 bool
@@ -1816,41 +1816,8 @@
 ) %7B%0A
-        this.description = desc;%0A
     
@@ -1951,80 +1951,8 @@
  %7D%0A%0A
-    public String getDescription() %7B%0A        return description;%0A    %7D%0A%0A
     

Replace `getDescription` with good old Javadoc