2424package  net .kyori .mammoth ;
2525
2626import  org .gradle .api .provider .HasConfigurableValue ;
27+ import  org .gradle .api .provider .Provider ;
2728import  org .jetbrains .annotations .NotNull ;
2829
2930public  final  class  Properties  {
3031  private  Properties () {
3132  }
3233
34+   /** 
35+    * Mark a property as being for use at configuration time. 
36+    * 
37+    * <p>Gradle has deprecated this method, but it is required on older Gradle versions.</p> 
38+    * 
39+    * @param <T> the provider value type 
40+    * @param provider provider to get for use at configuration time 
41+    * @return a configuration time-safe view of the provided provider 
42+    * @since 1.1.0 
43+    */ 
44+   public  static  <T > @ NotNull  Provider <T > forUseAtConfigurationTime (final  @ NotNull  Provider <T > provider ) {
45+     if  (GradleCompat .HAS_FOR_USE_AT_CONFIGURATION_TIME ) {
46+       return  provider .forUseAtConfigurationTime ();
47+     } else  {
48+       return  provider ;
49+     }
50+   }
51+ 
3352  /** 
3453   * Touches {@code property} to mark it as {@link HasConfigurableValue#finalizeValue() finalized}. 
3554   * 
3655   * @param property the property 
3756   * @param <T> the type 
3857   * @return the property 
39-    * @since 2 .0.0 
58+    * @since 1 .0.0 
4059   */ 
4160  public  static  <T  extends  HasConfigurableValue > @ NotNull  T  finalized (final  @ NotNull  T  property ) {
4261    property .finalizeValue ();
@@ -49,7 +68,7 @@ private Properties() {
4968   * @param property the property 
5069   * @param <T> the type 
5170   * @return the property 
52-    * @since 2 .0.0 
71+    * @since 1 .0.0 
5372   */ 
5473  public  static  <T  extends  HasConfigurableValue > @ NotNull  T  finalizedOnRead (final  @ NotNull  T  property ) {
5574    property .finalizeValueOnRead ();
@@ -62,7 +81,7 @@ private Properties() {
6281   * @param property the property 
6382   * @param <T> the type 
6483   * @return the property 
65-    * @since 2 .0.0 
84+    * @since 1 .0.0 
6685   */ 
6786  public  static  <T  extends  HasConfigurableValue > @ NotNull  T  changesDisallowed (final  @ NotNull  T  property ) {
6887    property .disallowChanges ();
0 commit comments