Deprecate support for module layout

Closes gh-8008
This commit is contained in:
Andy Wilkinson
2017-01-25 16:37:18 +00:00
parent a081c96523
commit cd5124005b
5 changed files with 25 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 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.
@@ -158,7 +158,9 @@ public final class Layouts {
/**
* Module layout (designed to be used as a "plug-in").
* @deprecated since 1.5 in favour of a custom {@link LayoutFactory}
*/
@Deprecated
public static class Module implements Layout {
private static final Set<LibraryScope> LIB_DESTINATION_SCOPES = new HashSet<LibraryScope>(

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 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.
@@ -87,6 +87,7 @@ public class LayoutsTests {
}
@Test
@SuppressWarnings("deprecation")
public void moduleLayout() throws Exception {
Layout layout = new Layouts.Module();
assertThat(layout.getLibraryDestination("lib.jar", LibraryScope.COMPILE))