Skip to content

Commit 012a7de

Browse files
author
xiaoqi
committed
update to 3.0.6
1 parent bda904b commit 012a7de

17 files changed

Lines changed: 106 additions & 108 deletions

File tree

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
2.1.0 增加对PersistableBundle的支持,NeedSave注解中设置isPersistable = true则说明该参数保存到PersistableBundle
2626
2.2.6 增加对自定义view的数据保存以及恢复
2727
3.0.0 增加autosave plugin,省去SaveHelper.save 和 SaveHelper.recover的调用
28-
3.0.3 简化引入方式
28+
3.0.6 简化引入方式
2929

3030
## 引入方式
3131
在project的gradle加入下面的依赖:
3232

3333
dependencies {
34-
classpath 'com.noober.save:plugin:3.0.3'
34+
classpath 'com.noober.save:plugin:3.0.6'
3535
}
3636

3737
在app的gradle或者module的gradle中加入下面插件即可:

build.gradle

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,18 @@ buildscript {
1212
maven {
1313
url uri('publish')
1414
}
15+
google()
1516
}
1617
dependencies {
17-
classpath 'com.android.tools.build:gradle:3.0.1'
18-
classpath 'com.novoda:bintray-release:0.5.0'
18+
classpath 'com.android.tools.build:gradle:3.1.2'
19+
classpath 'com.novoda:bintray-release:0.8.1'
1920
// NOTE: Do not place your application dependencies here; they belong
2021
// in the individual module build.gradle files
2122
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
22-
// classpath 'com.noober.plugin:savehelper-plugin:3.0.0'
23-
classpath 'com.noober.save:plugin:3.0.1-beta'
23+
// classpath 'com.noober.plugin:savehelper-plugin:3.0.4-beta'
24+
// classpath 'com.noober.save:plugin:3.0.1-beta'
2425
classpath 'org.aspectj:aspectjtools:1.8.13'
26+
// classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.2'
2527
}
2628
}
2729

@@ -48,7 +50,7 @@ ext {
4850
userOrg = 'noober'
4951
groupId = 'com.noober'
5052
uploadName = 'AutoSaver'
51-
publishVersion = '3.0.3'
53+
publishVersion = '3.0.6'
5254
desc = "A light weight framework can automatically generate 'OnSaveInstanceState' code"
5355
website = 'https://github.com/JavaNoober/AutoSave'
5456
// gradlew clean build bintrayUpload -PbintrayUser=xiaoqiandroid -PbintrayKey=xxxxxxxxxxxxxxxx -PdryRun=false
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Tue Nov 07 17:19:47 CST 2017
1+
#Wed Aug 15 11:27:21 CST 2018
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

sample/build.gradle

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-kapt'
33
apply plugin: 'kotlin-android-extensions'
44
apply plugin: 'kotlin-android'
5-
apply plugin: 'AutoSave'
5+
//apply plugin: 'JavasisstPlugin'
6+
67
android {
78
compileSdkVersion 26
8-
buildToolsVersion '26.0.2'
9+
buildToolsVersion '27.0.3'
910

1011
defaultConfig {
1112
minSdkVersion 14
@@ -22,8 +23,10 @@ android {
2223
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2324
}
2425
}
26+
2527
}
2628

29+
2730
dependencies {
2831
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
2932
compile fileTree(include: ['*.jar'], dir: 'libs')
@@ -32,9 +35,10 @@ dependencies {
3235
})
3336
implementation 'com.android.support:appcompat-v7:26.0.1'
3437
// testImplementation 'junit:junit:4.12'
35-
// implementation project(':savehelper')
36-
// implementation project(':savehelper-api')
37-
// kapt project(':savehelper-processor')
38+
// compile 'org.aspectj:aspectjrt:1.8.13'
39+
implementation project(':savehelper')
40+
implementation project(':savehelper-api')
41+
kapt project(':savehelper-processor')
3842
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
3943
}
4044

sample/src/main/AndroidManifest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313

1414
</activity>
1515
<activity android:name=".TestActivity">
16+
17+
</activity>
18+
<activity android:name=".KotlinActivity">
1619
<intent-filter>
1720
<action android:name="android.intent.action.MAIN" />
1821

1922
<category android:name="android.intent.category.LAUNCHER" />
2023
</intent-filter>
2124
</activity>
22-
<activity android:name=".KotlinActivity">
23-
24-
</activity>
2525
</application>
2626

2727
</manifest>

savehelper-api/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ publish {
1515
groupId = rootProject.groupId
1616
uploadName = rootProject.uploadName
1717
publishVersion = rootProject.publishVersion
18-
desc = rootProject.description
18+
desc = rootProject.desc
1919
website = rootProject.website
2020
}

savehelper-plugin/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ dependencies {
66
implementation gradleApi()
77
implementation localGroovy()
88
//groovy sdk
9-
implementation 'com.android.tools.build:gradle:3.0.1'
10-
// compile 'org.javassist:javassist:3.20.0-GA'
9+
implementation 'com.android.tools.build:gradle:3.1.2'
10+
// implementation 'org.javassist:javassist:3.20.0-GA'
1111
implementation 'org.aspectj:aspectjtools:1.8.13'
1212
}
1313

@@ -31,6 +31,6 @@ publish {
3131
groupId = 'com.noober.save'
3232
uploadName = rootProject.uploadName
3333
publishVersion = rootProject.publishVersion
34-
desc = rootProject.description
34+
desc = rootProject.desc
3535
website = rootProject.website
3636
}

savehelper-plugin/src/main/groovy/com/noober/plugin/SavePlugin.groovy

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@ package com.noober.plugin
22

33
import org.gradle.api.Plugin
44
import org.gradle.api.Project
5+
import org.gradle.api.tasks.Classpath
56
import org.gradle.api.tasks.compile.JavaCompile
67
import org.aspectj.bridge.IMessage
78
import org.aspectj.bridge.MessageHandler
89
import org.aspectj.tools.ajc.Main
10+
import org.gradle.testfixtures.ProjectBuilder
11+
12+
import java.nio.file.Paths
913

1014

1115
class SavePlugin implements Plugin<Project> {
@@ -14,10 +18,13 @@ class SavePlugin implements Plugin<Project> {
1418
void apply(Project project) {
1519
project.repositories {
1620
mavenLocal()
21+
jcenter()
1722
}
1823

19-
// final def autoSaveVersion = project.rootProject.publishVersion
20-
final def autoSaveVersion = '3.0.3'
24+
// project.dependencies {
25+
// implementation 'org.aspectj:aspectjrt:1.8.13'
26+
// }
27+
final def autoSaveVersion = "3.0.6"
2128
if (project.plugins.hasPlugin('kotlin-android')) {
2229
project.dependencies {
2330
implementation 'org.aspectj:aspectjrt:1.8.13'
@@ -33,7 +40,6 @@ class SavePlugin implements Plugin<Project> {
3340
implementation "com.noober:savehelper-api:${autoSaveVersion}"
3441
}
3542
}
36-
3743
final def log = project.logger
3844
final def variants
3945
if (project.plugins.hasPlugin('com.android.application')) {

savehelper-plugin/src/main/groovy/com/noober/plugin/javassist/MyPlugin.groovy

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//package com.noober.plugin
1+
//package com.noober.plugin.javassist
22
//
33
//import com.android.build.gradle.AppExtension
44
//import org.gradle.api.Action
@@ -12,6 +12,5 @@
1212
// void apply(Project project) {
1313
// def android = project.getExtensions().findByType(AppExtension);
1414
// android.registerTransform(new SaveTransform(project));
15-
//
1615
// }
1716
//}

0 commit comments

Comments
 (0)