2015-07-09 03:13:11 +02:00
|
|
|
// Copyright 2015 Google Inc. All rights reserved.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// 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 java
|
|
|
|
|
|
|
|
import (
|
2017-08-02 20:05:49 +02:00
|
|
|
"fmt"
|
|
|
|
"io"
|
|
|
|
|
2016-05-19 00:37:25 +02:00
|
|
|
"android/soong/android"
|
2015-07-09 03:13:11 +02:00
|
|
|
)
|
|
|
|
|
2017-08-11 02:00:19 +02:00
|
|
|
func (library *Library) AndroidMk() android.AndroidMkData {
|
|
|
|
return android.AndroidMkData{
|
|
|
|
Class: "JAVA_LIBRARIES",
|
|
|
|
OutputFile: android.OptionalPathForPath(library.outputFile),
|
|
|
|
Extra: []android.AndroidMkExtraFunc{
|
|
|
|
func(w io.Writer, outputFile android.Path) {
|
|
|
|
fmt.Fprintln(w, "LOCAL_MODULE_SUFFIX := .jar")
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2015-07-09 03:13:11 +02:00
|
|
|
}
|
|
|
|
|
2017-08-11 02:00:19 +02:00
|
|
|
func (prebuilt *Import) AndroidMk() android.AndroidMkData {
|
|
|
|
return android.AndroidMkData{
|
|
|
|
Class: "JAVA_LIBRARIES",
|
|
|
|
OutputFile: android.OptionalPathForPath(prebuilt.combinedClasspathFile),
|
|
|
|
Extra: []android.AndroidMkExtraFunc{
|
|
|
|
func(w io.Writer, outputFile android.Path) {
|
|
|
|
fmt.Fprintln(w, "LOCAL_MODULE_SUFFIX := .jar")
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2015-07-09 03:13:11 +02:00
|
|
|
}
|