Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support agp7.0 #505

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AndResGuard-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ version rootProject.ext.VERSION_NAME
group rootProject.ext.GROUP

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
implementation fileTree(dir: 'libs', include: ['*.jar'])
//compile group: 'com.tencent.mm', name: 'AndResGuard-core', version: version
compile project(':AndResGuard-core')
implementation project(':AndResGuard-core')
}

sourceSets {
Expand Down
8 changes: 4 additions & 4 deletions AndResGuard-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ group rootProject.ext.GROUP

[compileJava, compileTestJava, javadoc]*.options*.encoding = 'UTF-8'
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.tools.build:gradle:4.1.2'
compile 'commons-io:commons-io:2.6'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.tools.build:gradle:7.0.3'
implementation 'commons-io:commons-io:2.6'
}

sourceSets {
Expand All @@ -22,4 +22,4 @@ sourceSets {
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'

apply from: rootProject.file('gradle/java-artifacts.gradle')
apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
//apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
2 changes: 1 addition & 1 deletion AndResGuard-example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
classpath 'com.android.tools.build:gradle:7.0.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
12 changes: 6 additions & 6 deletions AndResGuard-gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ version rootProject.ext.VERSION_NAME
group rootProject.ext.GROUP

dependencies {
compile gradleApi()
compile localGroovy()
implementation gradleApi()
implementation localGroovy()
//compile group: 'com.tencent.mm', name: 'AndResGuard-core', version: version
compile 'com.google.gradle:osdetector-gradle-plugin:1.6.0'
compile project(':AndResGuard-core')
implementation 'com.google.gradle:osdetector-gradle-plugin:1.6.0'
implementation project(':AndResGuard-core')
}

repositories {
mavenCentral()
}

apply from: rootProject.file('gradle/java-artifacts.gradle')
apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
//apply from: rootProject.file('gradle/java-artifacts.gradle')
//apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import com.tencent.mm.resourceproguard.Main
import org.gradle.api.DefaultTask
import org.gradle.api.GradleException
import org.gradle.api.provider.Property
import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.TaskAction

/**
Expand All @@ -15,8 +16,14 @@ import org.gradle.api.tasks.TaskAction
* @author Sim Sun (sunsj1231@gmail.com)
*/
class AndResGuardTask extends DefaultTask {

@Internal
AndResGuardExtension configuration

@Internal
def android

@Internal
def buildConfigs = []

AndResGuardTask() {
Expand Down Expand Up @@ -92,6 +99,7 @@ class AndResGuardTask extends DefaultTask {
return "${file.parent}/AndResGuard_${fileName}/"
}

@Internal
def getZipAlignPath() {
return "${android.getSdkDirectory().getAbsolutePath()}/build-tools/${android.buildToolsVersion}/zipalign"
}
Expand Down
4 changes: 2 additions & 2 deletions SevenZip/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//apply plugin: 'com.google.osdetector'
apply plugin: 'maven'
//apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'java'

Expand Down Expand Up @@ -50,4 +50,4 @@ publishing {
}
}

apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
//apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
12 changes: 7 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenLocal()
maven { url "https://plugins.gradle.org/m2/" }
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.ofg:uptodate-gradle-plugin:1.6.2'
classpath 'com.android.tools.build:gradle:7.0.3'
// classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
// classpath 'com.ofg:uptodate-gradle-plugin:1.6.2'
}
}

allprojects {
repositories {
mavenLocal()
maven { url "https://plugins.gradle.org/m2/" }
google()
jcenter()
}
tasks.withType(JavaCompile) {
sourceCompatibility = rootProject.ext.javaVersion
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
ANDRESGUARD_VESSION=1.2.21
ANDRESGUARD_VESSION=1.2.22
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-all.zip