diff --git a/app-sample/build.gradle b/app-sample/build.gradle new file mode 100644 index 00000000..a63d63f0 --- /dev/null +++ b/app-sample/build.gradle @@ -0,0 +1,50 @@ +apply plugin: 'com.android.application' + +android { + + compileSdkVersion config['compile-sdk'] + buildToolsVersion config['build-tools'] + + defaultConfig { + applicationId 'io.noties.markwon.app' + minSdkVersion 23 + targetSdkVersion config['target-sdk'] + versionCode 1 + versionName version + + resConfig 'en' + + javaCompileOptions { + annotationProcessorOptions { + arguments = [ + // cannot cast GString... + // cannot use `-` + 'markwon.samples.file': "\"${projectDir}/samples.json\"".toString() + ] + } + } + } + + dexOptions { + preDexLibraries true + javaMaxHeapSize '5g' + } + + compileOptions { + targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_1_8 + } + + sourceSets { + main { + java.srcDirs += '../sample-utils/annotations' + } + } + + +} + +dependencies { + implementation 'io.noties:debug:5.1.0' + annotationProcessor project(':sample-utils:processor') +} diff --git a/app-sample/src/main/AndroidManifest.xml b/app-sample/src/main/AndroidManifest.xml new file mode 100644 index 00000000..eed3ca3b --- /dev/null +++ b/app-sample/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app-sample/src/main/java/io/noties/markwon/app/App.java b/app-sample/src/main/java/io/noties/markwon/app/App.java new file mode 100644 index 00000000..22d93c21 --- /dev/null +++ b/app-sample/src/main/java/io/noties/markwon/app/App.java @@ -0,0 +1,16 @@ +package io.noties.markwon.app; + +import android.app.Application; + +import io.noties.debug.AndroidLogDebugOutput; +import io.noties.debug.Debug; + +public class App extends Application { + + @Override + public void onCreate() { + super.onCreate(); + + Debug.init(new AndroidLogDebugOutput(true)); + } +} diff --git a/app-sample/src/main/java/io/noties/markwon/app/MainActivity.java b/app-sample/src/main/java/io/noties/markwon/app/MainActivity.java new file mode 100644 index 00000000..301fe240 --- /dev/null +++ b/app-sample/src/main/java/io/noties/markwon/app/MainActivity.java @@ -0,0 +1,16 @@ +package io.noties.markwon.app; + +import android.app.Activity; +import android.os.Bundle; + +import androidx.annotation.Nullable; + +public class MainActivity extends Activity { + + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + + } +} diff --git a/app-sample/src/main/java/io/noties/markwon/app/Test.java b/app-sample/src/main/java/io/noties/markwon/app/Test.java new file mode 100644 index 00000000..d9c61e70 --- /dev/null +++ b/app-sample/src/main/java/io/noties/markwon/app/Test.java @@ -0,0 +1,15 @@ +package io.noties.markwon.app; + +import io.noties.markwon.sample.annotations.MarkwonArtifact; +import io.noties.markwon.sample.annotations.MarkwonSample; + +@MarkwonSample( + id = "202006163161416", + title = "The first sample title", + description = "This is description", + artifacts = {MarkwonArtifact.CORE, MarkwonArtifact.EDITOR}, + tags = "none" +) +public class Test { + +} diff --git a/app-sample/src/main/res/drawable/ic_launcher_background.xml b/app-sample/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 00000000..49c86ecb --- /dev/null +++ b/app-sample/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,24 @@ + + + + diff --git a/app-sample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app-sample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 00000000..c4a603d4 --- /dev/null +++ b/app-sample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app-sample/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app-sample/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 00000000..c4a603d4 --- /dev/null +++ b/app-sample/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app-sample/src/main/res/mipmap-hdpi/ic_launcher.png b/app-sample/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000..fdd31819 Binary files /dev/null and b/app-sample/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/app-sample/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/app-sample/src/main/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..c787da34 Binary files /dev/null and b/app-sample/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/app-sample/src/main/res/mipmap-mdpi/ic_launcher.png b/app-sample/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000..597bbed4 Binary files /dev/null and b/app-sample/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/app-sample/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/app-sample/src/main/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..b80592da Binary files /dev/null and b/app-sample/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/app-sample/src/main/res/mipmap-xhdpi/ic_launcher.png b/app-sample/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000..c11d8df7 Binary files /dev/null and b/app-sample/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/app-sample/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/app-sample/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..d36bf1df Binary files /dev/null and b/app-sample/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/app-sample/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app-sample/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..2e240579 Binary files /dev/null and b/app-sample/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/app-sample/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/app-sample/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..d1f1abf9 Binary files /dev/null and b/app-sample/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/app-sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app-sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 00000000..5d9f00fc Binary files /dev/null and b/app-sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/app-sample/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/app-sample/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..37333547 Binary files /dev/null and b/app-sample/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/app-sample/src/main/res/values/colors.xml b/app-sample/src/main/res/values/colors.xml new file mode 100644 index 00000000..d9cb06d5 --- /dev/null +++ b/app-sample/src/main/res/values/colors.xml @@ -0,0 +1,4 @@ + + + #5CB85C + \ No newline at end of file diff --git a/app-sample/src/main/res/values/strings.xml b/app-sample/src/main/res/values/strings.xml new file mode 100644 index 00000000..74a01aa0 --- /dev/null +++ b/app-sample/src/main/res/values/strings.xml @@ -0,0 +1,4 @@ + + + Markwon + \ No newline at end of file diff --git a/app-sample/src/main/res/values/styles.xml b/app-sample/src/main/res/values/styles.xml new file mode 100644 index 00000000..955c5cc3 --- /dev/null +++ b/app-sample/src/main/res/values/styles.xml @@ -0,0 +1,8 @@ + + + + +