org.ysb33r.grolifant.loadable.v4.DefaultProjectTools.groovy Maven / Gradle / Ivy
/*
* ============================================================================
* (C) Copyright Schalk W. Cronje 2016 - 2024
*
* This software is licensed under the Apache License 2.0
* See http://www.apache.org/licenses/LICENSE-2.0 for license details
*
* 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.ysb33r.grolifant.loadable.v4
import groovy.transform.CompileStatic
import org.gradle.api.Project
import org.gradle.api.provider.Provider
import org.ysb33r.grolifant.api.core.ProjectOperations
import org.ysb33r.grolifant.loadable.core.ProjectToolsProxy
/**
* @since 2.0
*/
@CompileStatic
class DefaultProjectTools extends ProjectToolsProxy {
DefaultProjectTools(ProjectOperations po, Project project) {
super(po, project, project.provider { -> project.version?.toString() })
this.projectGroup = project.provider { -> po.stringTools.stringize(project.group ?: UNSPECIFIED_PROJECT_GROUP) }
}
/**
* Lazy-evaluated project group.
*
* @return provider to project group
*/
@Override
Provider getGroupProvider() {
this.projectGroup
}
private final Provider projectGroup
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy