aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/android/tools/r8/shaking/ProguardConfigurationSourceStrings.java
blob: ac5f0abf32cfde1a8fd9c065cdcc47e66cc12c82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

package com.android.tools.r8.shaking;

import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
import joptsimple.internal.Strings;

public class ProguardConfigurationSourceStrings implements ProguardConfigurationSource {
  private final List<String> config;

  public ProguardConfigurationSourceStrings(List<String> config) {
    this.config = config;
  }

  public String get() throws IOException{
    return Strings.join(config, "\n");
  }

  public Path getBaseDirectory() {
    return Paths.get(".");
  }

  public String getName() {
    return "<no file>";
  }
}