1/* 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16plugins { 17 id 'java' 18 id 'application' 19} 20 21group 'com.ohos' 22 23 24repositories { 25 maven { url 'https://mirrors.huaweicloud.com/repository/maven/' } 26} 27 28dependencies { 29 implementation 'org.bouncycastle:bcpkix-jdk15on:1.69' 30 testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.2' 31 testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.2' 32 implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.17.1' 33 implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.17.1' 34 implementation 'com.google.code.gson:gson:2.9.0' 35 implementation project(':hap_sign_tool_lib') 36} 37 38test { 39 useJUnitPlatform() 40} 41 42jar { 43 duplicatesStrategy = DuplicatesStrategy.EXCLUDE 44 45 from sourceSets.main.output 46 47 dependsOn configurations.runtimeClasspath 48 from { 49 configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { zipTree(it) } 50 } 51 exclude 'META-INF/*.DF' 52 exclude 'META-INF/*.DSA' 53 54 manifest { 55 attributes 'Main-Class': 'com.ohos.hapsigntool.HapSignTool' 56 } 57 58 archiveBaseName = "hap-sign-tool" 59 60}