View Javadoc
1   /*
2    * Copyright (C) 2009 Jayway AB
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package com.simpligility.maven.plugins.android;
17  
18  import org.junit.Assert;
19  
20  import com.simpligility.maven.plugins.android.AndroidSdk;
21  
22  import java.io.File;
23  
24  /**
25   * @author hugo.josefson@jayway.com
26   */
27  public class SdkTestSupport {
28      private final String env_ANDROID_HOME = System.getenv("ANDROID_HOME");
29  
30      private final AndroidSdk sdk_with_platform_default;
31  
32      public SdkTestSupport() {
33          Assert.assertNotNull("For running the tests, you must have environment variable ANDROID_HOME set to a valid Android SDK 25 directory.", env_ANDROID_HOME);
34  
35          sdk_with_platform_default = new AndroidSdk(new File(env_ANDROID_HOME), "25", "25.0.3");
36      }
37  
38      public String getEnv_ANDROID_HOME() {
39          return env_ANDROID_HOME;
40      }
41  
42      public AndroidSdk getSdk_with_platform_default() {
43          return sdk_with_platform_default;
44      }
45  }